Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: nonny on January 28, 2016, 02:15:18 AM

Title: KVListGetStringValue Boolean
Post by: nonny on January 28, 2016, 02:15:18 AM
Hi

Pulling key values from a list, if the values are Boolean, URS is setting the value to 0 or 1 rather than the actual text value.  How can I stop that happening or what is the best function to manipulate that in a single line that includes the lookup?

Sent from my SM-N9005 using Tapatalk

Title: Re: KVListGetStringValue Boolean
Post by: cavagnaro on January 28, 2016, 03:20:48 AM
Boolean is not TEXT...you may see a TRUE/FALSE as a representation but also can be 1/0, they are boolean
Title: Re: KVListGetStringValue Boolean
Post by: terry on January 28, 2016, 06:16:07 AM
KVLists as far as I know doesn't support Boolean type so most likely it is already 0/1 in KVList itself (the one KVListGetStringValue gets on input).
And if it so you can get only 0/1 (as integers or as strings).
If strings "true"/"false" required then probably need to be done explicitly. Simple single line construction: CondInt[KVListGetStringValue[...], "true", "false"]

 
Title: Re: KVListGetStringValue Boolean
Post by: nonny on January 28, 2016, 08:02:29 AM
Thanks guys, that's what I had assumed.  I've had to deal with it by doing a couple of StrReplace functions when doing the Assign.  That's easier than asking our REST developer to change the response.
Title: Re: KVListGetStringValue Boolean
Post by: cavagnaro on January 28, 2016, 02:22:25 PM
;D Know that pain, simple task but soooo frustrating