Dynamically generated Valueset not appearing in Android

Discussions about CSEntry
Post Reply
KASTELIC
Posts: 22
Joined: July 8th, 2013, 1:52 pm

Dynamically generated Valueset not appearing in Android

Post by KASTELIC »

I have a variable, "What is the id code of the proxy respondent?" that generates the valueset from external dictionary file containing the household members. The setvalueset works perfectly when run on Windows; generates the codes and labels and displays the appropriate household members. However, when I execute this on the Android tablet, it does not give a valueset at all. Any ideas? Works fine in Windows environment, not Android.

Here is the logic I am using

preproc

{ ** LOAD ROSTER INFORMATION ** }


j = max(ROS_B00);

do i = 1 while i<=j+1
if i<=j then
codes(i-1) = i;
elseif i=j+1 then
codes(i-1)=notappl;
endif;
if i<=j then
labels(i-1) = strip(concat(strip(ROS_B01_1(i))," ",strip(ROS_B01_3(i))));
endif;
enddo;

setvalueset($, codes, labels);
set attributes($) assisted on (responses);

Thanks,

Jon
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Dynamically generated Valueset not appearing in Android

Post by josh »

On Android is it coming up as a text box or as an empty list? If it is coming up as a text box then try setting the field type set to radio button or drop down either on the form or in code (use setcapturetype($, 3)).

If that isn't it then send us a working example so we can run it in the debugger and see what is going on.
KASTELIC
Posts: 22
Joined: July 8th, 2013, 1:52 pm

Re: Dynamically generated Valueset not appearing in Android

Post by KASTELIC »

Thanks Josh,

Textbox is the only option available for a variable without a hard coded valueset, so the application was activating a textbox even know the set attributes assist on was coded. Your suggestion to use the "setcapturetype" command resolved the issue.

Many thanks!

Jon
reeve
Posts: 17
Joined: July 29th, 2015, 9:55 am
Location: Washington, DC

Re: Dynamically generated Valueset not appearing in Android

Post by reeve »

This post finally enabled me to get household rosters to appear on my Android tablets. Perhaps this needs better documentation. A few of the setvalueset examples also include a "set attributes" line, but I didn't see any with setcapturetype.

Or, maybe the default for setvalueset should be to turn on attributes and capturetype. It's easier for a user to turn something off or change something than to discover what seems like an obscure command in order to get anything at all to appear on an Android tablet (esp. when it is working ok on Windows).

And thanks Jon and Josh for posting this!

Reeve
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Dynamically generated Valueset not appearing in Android

Post by josh »

Thanks for the feedback. We will update the examples in the online help.

Personally I never use setcapturetype, I simply set the capture type from the field properties dialog in the forms editor but that is just personal preference.
Post Reply