Interface is holding Dict TypeProcess model is holding Map Type
Clash b/w the dataTypes while triggering PM.Could you please help me to convert dict to map before triggering?
Discussion posts and replies are publicly visible
you can use a!map() function docs.appian.com/.../fnc_system_map.html
cast( typeof({a!map()}), { name: "Harshit", website: "harshitbumb.com", blog: "appianspace.com" } )
I try to avoid using typeof and reference the type directly.
cast( type!Map, { name: "Harshit", website: "harshitbumb.com", blog: "appianspace.com" } )
Interface or Expression rule?
You can use the cast() function to cast into Map but AFAIK there is no need for it, as dictionary gets casted into Map automatically, if your output is of type List of dictionary then make sure that Map type pv! is Multiple selected.
Just curious, why are you using a dictionary? Maps are essentially better than a dictionary in every way, so it's usually better to define your data using a map instead. If you're receiving the data from an integration or something, you can also use the options that others suggested to cast to a map.
To each their own :)
I personally find typeof more predictiable than using direct types because of the auto-complete which is hit and miss
Same. I agree. Also, it becomes difficult when you have to cast to a list of that type.
By habit I also use typeof() but a list using type!map is still straightforward (unless I'm missing something)
cast( a!listType(type!Map), { { name: "Harshit", website: "harshitbumb.com", blog: "appianspace.com" }, { name: "Stefan", website: "appian.rocks", blog: "https://appian.rocks/blog-posts/" } } )
Or
cast( 'type!Map?list', { { name: "Harshit", website: "harshitbumb.com", blog: "appianspace.com" }, { name: "Stefan", website: "appian.rocks", blog: "https://appian.rocks/blog-posts/" } } )
Andrew Hickingbotham, I was this year old when I knew about this function. I still prefer wrapping the type in {} to make it an array. Makes me less worried about anything going wrong because of a typo.