" /> KVListGetStringValue Boolean - Genesys CTI User Forum

Author Topic: KVListGetStringValue Boolean  (Read 2158 times)

Offline nonny

  • Full Member
  • ***
  • Posts: 218
  • Karma: 2
KVListGetStringValue Boolean
« on: January 28, 2016, 02:15:18 AM »
Advertisement
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


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: KVListGetStringValue Boolean
« Reply #1 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

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: KVListGetStringValue Boolean
« Reply #2 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"]

 

Offline nonny

  • Full Member
  • ***
  • Posts: 218
  • Karma: 2
Re: KVListGetStringValue Boolean
« Reply #3 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.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: KVListGetStringValue Boolean
« Reply #4 on: January 28, 2016, 02:22:25 PM »
;D Know that pain, simple task but soooo frustrating