Unselect radio button in CAPI

Other discussions about CSPro
Forum rules
New release: CSPro 8.0
Post Reply
lmangcahan
Posts: 25
Joined: September 7th, 2021, 3:45 am

Unselect radio button in CAPI

Post by lmangcahan »

Hi CSPro Team,

Good day. Is there a way in v7.7 to unselect a radio button using CAPI?
Thank you.
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Unselect radio button in CAPI

Post by sherrell »

No, once a field is chosen there is no way to "undo" it, i.e., unselect it.

What are you trying to do? (Trying to see if there's some other way around the problem)

Sherrell
lmangcahan
Posts: 25
Joined: September 7th, 2021, 3:45 am

Re: Unselect radio button in CAPI

Post by lmangcahan »

Hi Sherrell,

While using CAPI there will be times that modification of entries is necessary for the skipping pattern to work. The former input (in radio button) must be cleared/unselected since it's been skipped in data entry. So, when running a data consistency program, the saved data has outliers.
I noticed that these items can only be removed/unselected using the desktop version, not in CAPI.
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Unselect radio button in CAPI

Post by sherrell »

>I noticed that these items can only be removed/unselected using the desktop version, not in CAPI.

On a PC the user can hit the delete key to remove a radio button selection, while on the Android the delete key doesn't exist. Is that what you're referring to when you say it can be removed/unselected on a PC? For the Android, you have two options:

1) add "notappl" to the dictionary item's value set
2) add a userbar option that will clear the current value, something like:

Code: Select all

setvalue(getsymbol(), notappl);
The problem with the first choice is that if you're making calls to

Code: Select all

invalueset()
then it will return true for notappl, which you probably don't want to happen. So for those (numeric) DCF items you'll either have to combine it with the special function:

Code: Select all

if invalueset() and !special($) then
or hardcode the test, something like:

Code: Select all

if DCF_ITEM in lowerRange:upperRange then
FYI, it's on our "to do" list to allow clearing fields on Android. Not sure when that will happen, but it is on our list.

Sherrell
Post Reply