" /> Blank value of KVListGetListValue function - Genesys CTI User Forum

Author Topic: Blank value of KVListGetListValue function  (Read 1917 times)

Offline gen_den

  • Full Member
  • ***
  • Posts: 176
  • Karma: 0
Blank value of KVListGetListValue function
« on: November 27, 2017, 02:45:34 PM »
Advertisement
Hi EXpert,

need your urgent help in following.

In my IRD strategy i am doing a GET request and below is the response saved in variable varStatus. This variable is of type LIST:

varStatus(LOCAL) <- LIST[1]: 0._desired_time:2017-11-28T10:00:00.000Z|0._callback_state:SCHEDULED|0._service_name:vfde|0._expiration_time:2017-11-29T09:59:59.000Z|0._channel:web|0._topic:Bill|0._entity_type:acn|0._onlineuser_id:7676|0._id:808-7ebec14e-86b8-4b04-9da7-e7235783dfea|0._customer_number:0447852294177|0._url:/genesys/1/service/callback/vfde/808-7ebec14e-86b8-4b04-9da7-e7235783dfea|0._entity_id:1740346767|0.[b]_delete_url[/b]:/gmchat/service/cb-setup-v1?_callback_number=0447852294177&_entity_id=1740346767&_onlineuser_id=&_delete=yes&_topic=Bill|0._reschedule_url:/gmchat/service/cb-setup-v1?_callback_number=0447852294177&_entity_id=1740346767&_onlineuser_id=&_reschedule=yes&_topic=Bill|0._callback_number:0447852294177


Next Block is where i am trying to assign the value of _delete_url in variable varDeleteURL , this variable is of type STRING.

In order to do so I am using function  [b]KVListGetListValue[varStatus,'_delete_url'][/b].. But i am getting value is BLANK:

ASSIGN: varDeleteURL(LOCAL) <- STRING[1,0]: ""


can you please let me know if i am using the correct function or any other way i can retrieve the value of _delete_url ?


Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: Blank value of KVListGetListValue function
« Reply #1 on: November 27, 2017, 02:56:22 PM »
You have to use syntax "0._delete_url" or make from the result "0" new KVList and then you can use your syntax (KVListGetListValue[varListStatus,'_delete_url'])
« Last Edit: November 27, 2017, 03:00:41 PM by Kubig »

Offline gen_den

  • Full Member
  • ***
  • Posts: 176
  • Karma: 0
Re: Blank value of KVListGetListValue function
« Reply #2 on: November 27, 2017, 03:03:00 PM »
Hi Kubig,

Thanks for the reply, forgot to mention this value 0 is dynamic, it changes according the number of times call scheduled by customer.
In that case how can i achieve that ?

Also make from the result "0"?

Thanks

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: Blank value of KVListGetListValue function
« Reply #3 on: November 27, 2017, 03:04:40 PM »
As I wrote, just create new list from the result and then you can use the basic syntax (KVListGetListValue[varListStatus,'_delete_url'], where varListStatus is KVList created from varStatus variable)

Offline gen_den

  • Full Member
  • ***
  • Posts: 176
  • Karma: 0
Re: Blank value of KVListGetListValue function
« Reply #4 on: November 27, 2017, 03:21:50 PM »
Sorry i just did'nt follow you here  "new list from the result "

My result is :

[i]0._desired_time:2017-11-28T10:00:00.000Z|0._callback_state:SCHEDULED|0._service_name:vfde|0._expiration_time:2017-11-29T09:59:59.000Z|0._channel:web|0._topic:Bill|0._entity_type:acn|0._onlineuser_id:7676|0._id:808-7ebec14e-86b8-4b04-9da7-e7235783dfea|0._customer_number:0447852294177|0._url:/genesys/1/service/callback/vfde/808-7ebec14e-86b8-4b04-9da7-e7235783dfea|0._entity_id:1740346767|0._delete_url:/gmchat/service/cb-setup-v1?_callback_number=0447852294177&_entity_id=1740346767&_onlineuser_id=&_delete=yes&_topic=Bill|0._reschedule_url:/gmchat/service/cb-setup-v1?_callback_number=0447852294177&_entity_id=1740346767&_onlineuser_id=&_reschedule=yes&_topic=Bill|0._callback_number:0447852294177[/i]


I need to create a new variable of Type LIST ?

Sorry if it's very basic question :(

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Blank value of KVListGetListValue function
« Reply #5 on: November 27, 2017, 07:21:28 PM »
You can try STRING key= KVListGetKey[varStatus, 1]; LIST subList= KVListGetListValue[varStatus, key];

But basically it depends from what exactly GET request returns (in other words what value you assigned to varStatus in first place).