Page 3 of 3

Re: Lookup

Posted: July 30th, 2017, 7:52 am
by arkagwa
Dear josh

I will try to check but in UG FORM i have .pen and .pff files updated versions
In UG LOOKUP there two files .dcf and .dat files

Re: Lookup

Posted: July 30th, 2017, 12:50 pm
by arkagwa
Dear Josh

Please try on any android device for me still does not work. I have attached the file for testing
UG FORM.zip

Re: Lookup

Posted: July 31st, 2017, 6:46 am
by josh
The problem is that you are using "set attributes assisted (responses)" to show the value sets on Windows. This is a really old feature that we don't use anymore and it does not work on Android. The correct way to do this is to set the capture type on the field to "Radio button". You can do this by right clicking on the field and choosing field properties and then picking "Radio button" under "Capture type".

Re: Lookup

Posted: July 31st, 2017, 10:36 am
by arkagwa
Dear Josh

Course codes and Title are alpha/string variable they can't be radio button. If i disable "set attributes assisted (responses)" nothing is shown in value sets on Windows hence difficult to load course codes and titles.

Re: Lookup

Posted: July 31st, 2017, 11:05 am
by josh
I made course code a radio button and removed the set attributes and it worked for me on both Windows and Android.

Re: Lookup

Posted: August 1st, 2017, 5:31 am
by Yana
__________________________
Dear Josh
When the above example application is very helpful. But my question is in the listing app there aren't included in the main questionnaire for example in my application the listing is all households with under five children and the main questionnaire targeted on only households with under five and that child has common childhood illness in the past two weeks. So how to filter these households when we display list of households in the CHOOSE_HOUSEHOLD variable in the menu in your example application.
Thanks

Re: Lookup

Posted: August 1st, 2017, 7:14 am
by josh
Next time please post to a new topic rather than adding to a question that has already been answered.

To display only the households that meet a certain condition (such as those with illness in last two weeks) you would just add an if statement inside the while loop. This if statement filters out the households that do not meet the condition.
while loadcase(LISTING_DICT) do
   
if ILLNESS_IN_LAST_TWO_WEEKS = 1 then
        
// Values are household ids concatenated together
        codesString(nextEntry)=maketext("%d%02d%03d%d%03d",
               LI_PROVINCE, LI_DISTRICT, LI_ENUMERATION_AREA,
               LI_AREA_TYPE, LI_HOUSEHOLD_NUMBER);

        
// Labels have househould number and name of head
        labels(nextEntry) = maketext("%03d: (%s)", LI_HOUSEHOLD_NUMBER,
        
strip(LI_NAME_OF_HEAD_OF_HOUSEHOLD));

        nextEntry = nextEntry +
1;
   
endif;
enddo;
This assumes you have a variable named ILLNESS_IN_LAST_TWO_WEEKS in your listing dictionary.

Re: Lookup

Posted: August 1st, 2017, 11:10 am
by Yana
Thanks Josh