Page 1 of 1

Unselect radio button in CAPI

Posted: August 17th, 2022, 10:10 pm
by lmangcahan
Hi CSPro Team,

Good day. Is there a way in v7.7 to unselect a radio button using CAPI?
Thank you.

Re: Unselect radio button in CAPI

Posted: August 17th, 2022, 10:20 pm
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

Re: Unselect radio button in CAPI

Posted: August 22nd, 2022, 2:43 am
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.

Re: Unselect radio button in CAPI

Posted: August 22nd, 2022, 5:08 pm
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