I have a process variable of map type and i am getting data like below array.How can i cast this to map.{id=1, Name=,class=12, sub=, }
Discussion posts and replies are publicly visible
Have you tried just saving it into the map type PV? What happens?
Mike SchmittYes I tried no luck. I am also trying in expression rule to cast as map however getting syntax error because of no value for Name and Sub. Somehow if it is update to null then it can work.
What are you doing in your expression rule to try and cast? Any snippet / screenshot?
I am just trying to test in expression rule if this array convert to map. If didn't work, I'll share the details with screenshots or code if I didn't get the desired output. Thanks for your patience and I appreciate your quick responses.
Just works ..,
cast( type!Map, { key1: "value1" } )
I am curious to know if process and expression works in same manner or not. I've heard from someone that they doesn't work the same so that's the reason why I am seeing an error in the snapshot uploaded. In my case, Process variable doesn’t have any value for my websites and even not showing null. I copied this from process variable only and it works there but not here.
The issue here is that a field name, followed by a colon and then a comma is invalid syntax. In case you want to assign a null value, just write "null" or null(). This has nothing to do with casting or maps.