Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: rolf_b on September 13, 2023, 03:48:25 PM
-
Hello,
I am still stuck with IRD and URS.
With ListGetDataCfg I can specify a list, in this list I can specify an item (the annex section) and in this item I can read the value of a key. The value I get may be ''. But since '' is a valid entry, I still don't know if that key exists, or if its value is just empty.
With ListLookupCfg, I can address a list, in this list I can address an item. So, I can check if a section exists. Nice, but what about keys? Is that impossible?
I tried ListLookupCfg('List', 'Item/Key') and ListLookupCfg('List', 'Item.Key'), with no success. Am I missing something? How can I reliably check if a key exists in a Configuration List-Object?
Thanks
Rolf
-
What's the aim here?
If we want to check if a key exists in a list, use ListLookupCfg.
Now that we know the key exists and if we want to check the key has empty string as value, check its value (using ListGetDataCfg maybe) against an empty string. say x == ''.
Ofcourse the functions can be nested.
-
You can receive entire list by not specifying the item or by using * instead of real value (do not remember it well). Based on that you can check whether the specified key does exist in the list or not