Discussion posts and replies are publicly visible
Hi, I am facing same issue. my local variable return list of string. count and length both return 1
PFA snapshot.
this is not very meaningful without seeing your actual code, data structure, etc.
What is the "totalCount" here actually resulting from? How are you trying to ascertain the length/count?
a!localVariables( local!orderIds: rule!ABC_getOrders(id: "Abc"), //integration call returns List of strings local!totalCount: length(local!orderIds), local!totalCount)
your integration call is probably returning a nested list. you didn't post the expanded version of the data structure it's returning so it's hard to know for sure. either way, wrap "rule!ABC_getOrders()" in a "a!flatten()" call and see what happens.
Thank you for your input. On the formatted result it say "list of String " but when i open the value it shows Anytype ,
I type cast to list string and it worked. thanks.
a!localVariables(
local!orderIds: rule!ABC_getOrders(id: "Abc"), //integration call returns List of strings
local!totalCount: length(cast(typeof({"asdjahsd","asdasfasd"}),local!orderIds)),
local!totalCount)
Instead of using typeof() you can also directly reference a type. In your case it would be one of this.
{ typename('type!Text?list'), typename(a!listType(type!Text)), }
or just wrap in toUniformString()?