LOOKUP VALUESETS

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
ishycienth
Posts: 8
Joined: May 22nd, 2017, 9:22 am

LOOKUP VALUESETS

Post by ishycienth »

Hi All,

Thank you for always assisting me in my hour of need. Once again, a have a challenge that I require your support to pull through. I have a mapping exercise that is going to cover a large number of communities across different geopolitical regions. I want to design a data entry application with a dynamic valuesets to limit enumerators within a list of communities under a region (Ward) earlier selected.

To do this, I have, many time tried to convert the said data values from excel to *.dat file, but what I keep getting is a list of 11 communities instead of the actual number as contained in the attached excel file. I'm not sure what I have gotten right yet, but I do know that the 11 conversions are based on the number of unique codes (Ward_Code). Please help.
Attachments
Communities.zip
(19.44 KiB) Downloaded 288 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: LOOKUP VALUESETS

Post by josh »

Since the only id-item is WARD and there are only 11 unique WARDS in your Excel file you are only getting 11 cases in the result. In a CSPro data file the id-item needs to be unique so cases with the same id as previous cases overwrite the previous case.

If you add the COM_CODE as a second id item then all your cases will be unique. This will give you a total of 502 cases, one for each community.

A second option, which might be more useful for creating the dynamic value set is to make the MAX for the COMMUNITIES greater than 1 to allow to have a case for each ward with multiple communities in the ward. That way for each ward you will multiple instances of the COMMUNITIES record, one for each community in the ward. To avoid missing any communities you need to pick a value for the MAX that is greater than or equal to the largest number of communities in a single ward.
ishycienth
Posts: 8
Joined: May 22nd, 2017, 9:22 am

Re: LOOKUP VALUESETS

Post by ishycienth »

Hi Josh,

Thank you very much for your support. Your prompt response has, once again, saved me a lot of troubles. Thanks again.
Post Reply