I have a local variable which is receiving BacthPayloadInput Response from process model
local!updatedPurchasers_at: index( ri!EF_GeneralUpdatePayload_cdt.RequestJson, wherecontains( tostring("PowerPurchasers"), cast(103, index(ri!EF_GeneralUpdatePayload_cdt,"RequestEndpoint",{})) ), null ),
when i output the values it contains in expression rule it gives me output like this:
I want to extract the only "KeyPowerPurchasers" out of it which i am not able to do so.
I have been trying to get it in following these two methods but both are having problem:
first one:
local!purchaserKeys_int:reject( fn!isnull, { if( a!isNullOrEmpty(local!updatedPurchasers_at), null, cast(101, index(local!updatedPurchasers_at, "KeyPowerPurchasers", {})) ) } ),
it gives empty array {}
2nd one:
local!purchaserKeys_int:reject( fn!isnull, { if( a!isNullOrEmpty(local!updatedPurchasers_at), null, cast(101,a!fromJson(local!updatedPurchasers_at).KeyPowerPurchasers) ) } ),
this gives
Expression evaluation error at function a!fromJson : The jsonText parameter was not valid JSON.
can anyone please guide how can i get the list of KeyPowerPurchasers out of it only?
Discussion posts and replies are publicly visible
a!forEach( items: local!list, expression: extract( fv!item,"KeyPowerPurchasers:","," ) )
Save your output in a variable and pass that in place of local!list
is it possible to map it into single list?
How do you want your output to look like?
{-2147483254, -2147483253} in this form
Yes. It is the same, Try looking at your output in expression instead of formatted.