Hello: When I create a query rule of all rows of a CDT that contains

Hello:

When I create a query rule of all rows of a CDT that contains a nested CDT in a one-to-many relationship, using the dot notation to access the Appian foreign key field results in an error "Cannot slice index (index by name on a list) when the element has no list type".

For example: rule!queryAllCDTs.oneToManyLinkToCDT

Logically, the field that is a foreign key to a one to many CDTs is just an array of CDTs, and should be able to be retrieved from the datasubset.

Thank you...

OriginalPostID-114430

OriginalPostID-114430

  Discussion posts and replies are publicly visible

Parents
  • The comment left by Eduardo certainly works. The solution uses apply to loop through every element in the one-to-many nested CDT and build the array of elements. I agree that it works, but the performance is dreadfully slow for large data sets, which is a definite possibility for our data requirements. The point of this topic on the Appian forum to point out something that logically should be possible, but results in an error. Using a looping function would be much slower in almost all cases than having Appian moving the entire dataset through memory. Thank you.
Reply
  • The comment left by Eduardo certainly works. The solution uses apply to loop through every element in the one-to-many nested CDT and build the array of elements. I agree that it works, but the performance is dreadfully slow for large data sets, which is a definite possibility for our data requirements. The point of this topic on the Appian forum to point out something that logically should be possible, but results in an error. Using a looping function would be much slower in almost all cases than having Appian moving the entire dataset through memory. Thank you.
Children
No Data