I have Projectetam CDT .I need to retrieve all records which consist of projectid 101 .Im try to write retrieve but getting only one record .Can anyone suggest me on this .
For reference i added the screenshots
Thanks
Discussion posts and replies are publicly visible
This is happening because you are casting a list to a single type. In your Cast function, wrap your CDT in the a!listType() function https://docs.appian.com/suite/help/20.3/fnc_informational_a_listtype.html
If you are not on Appian 20.3, you can also wrap your CDT in { }
I find it easier to use the "?list" operator on the type definition when using it in a cast call - the only tricky part being that Appian doesn't document this functionality super well and you need to know in advance to get rid of the "()" that Appian autofills if you use the autocomplete functionality on the type! domain.
I do like that the new a!listType() function now officially enshrines this in documented code, however I'm confused as to what it actually adds when we had the exact same functionality before just by appending "?list" after the CDT name inside the single quotes?
a!listType() has the benefit of returning the integer representation of the CDT instead of just the type itself
docs.appian.com/.../Appian_Release_Notes.html
im unable to use a!listType()
Expression evaluation error at function a!listType [line 3]: Invalid function a!listType (not available as [])
Can you suggest me other way
As I was mentioning above, add the exact text '?list' at the end of your CDT name in the type! call, inside the single quotes. That or just remove the cast() function from your expression rule (you really only need this if there's some strict requirement that the resulting data be type cast, instead of general dictionary data which usually works just fine).
added '?list' inside type! as per your instructions
verified able to retrieve now
Thanks for the support