Hi,
I have a list of dictionaries provided by an SPROC's output, I need to filter the list from a parameter inside the dictionary and retrieve one of the dictionary.
My list looks like this
List of Dictionary: 2 items Dictionary American : 1
Asian: 0
Code: "32"
Dictionary American : 1
Code: "33"
I want to filter the Dictionary by using the parameter Code.My code looks as follows
local!dataSubset: todatasubset( index( local!spResult.result, wherecontains( "32", tostring(local!spResult.result.Code) ) ), local!pagingInfo ),
where local!spResult.result is the local variable storing the SPROC'S output.
Regards,
Abhishek Gaddam.
Discussion posts and replies are publicly visible
Hi,the issueoccur because you are using tostringtostring - return text and touniformstring, it return the list of stringso please replace tostring to touniformstring index(local!spResult.result,wherecontains("32",touniformstring(local!spResult.result.Code)))
OR
index(local!spResult.result,wherecontains(32,tointeger(local!spResult.result.Code)))