Hi,
KIndly help me how to get keys from dynamically listed dictionary, this could be of any type means list of variant, list dictionary, list map, map, dictionary,
when getting result, it is type of dictionary, when checking its type it is showing of any type.
Below is the code which is not working.
a!localVariables( local!data: { id: 1, name: { firstname: "shree", lastname: "tiwari" } }, local!name: property(local!data, "name", null()), local!keys: a!keys(local!name), local!keys /*{*/ /*typename(*/ /*typeof(property(local!data, "id", null()))*/ /*),*/ /*typename(*/ /*typeof(property(local!data, "name", null()))*/ /*),*/ /*property(local!data, "id", null()),*/ /*property(local!data, "name", null()),*/ /*local!keys*/ /*}*/ )
Commented code to check type of above local!name variable.
added screenshot of response for reference.
Kindly suggest how to do this in appian.
Thanks in advance,
Shree Krishna Tiwari
Discussion posts and replies are publicly visible
I can recreate this. Simplified version:
a!localVariables( local!data: { id: 1, name: { first: "mike", last: "schmitt" } }, /*a!keys(local!data)*/ a!keys(local!data.name) )
Running it on the parent dictionary works:
But it fails inexplicably when running it on the child dictionary, even though it should be functionally identical to being run on the parent:
I'd suggest opening a Support Case with Appian Support.
Thanks a lot Mike, for your effort and suggestion.
will try to create a support case.
Hey,
Keys doesn't support Any Type, it is a little strange that indexing in doesn't keep the Dictionary type. I think its because Dictionaries are not strongly typed (the preview is doing the type detection in the local list).
Worth raising the case perhaps, but in the mean time if you use a!map which is strongly typed then it works fine.
/Dave
use Dictionary Manipulation (plug in)-> getkeysfromdictionary function