Hi,
I have the list of CDTs:
{
CDT(id: 1, name: "SomeName1"),
CDT(id: 2, name: "SomeName1"),
CDT(id: 3, name: "SomeName1"),
CDT(id: 4, name: "SomeName1")
}
How can I find an index of the CDT, that have id=4?
Thanks
Discussion posts and replies are publicly visible
Lets say your cdt list variable name is ri!cdtList, then index(ri!cdtList,wherecontains(4,tointeger(ri!cdtList.id),{}) will return the CDT where id is 4. If you just want index then expression wherecontains(4,tointeger(ri!cdtList.id) will do the needful.
Hope this helps.