Skip to main content
November 1, 2021
Solved

Passing entire record CDT a record to a related action

  • November 1, 2021
  • 12 replies
  • 0 views

I would like to be able to pass the ALL the data for a selected record (using the data type for the individual record) to a related action.  However when I try, I get the attached message.  Is there a way to do this? It is possible to pass rv!record to a record view, for example.

Best answer by mikes0011

It's a little silly, but as far as I've been able to tell you either have to construct the CDT manually by referencing all fields manually, OR (and slightly easier) query the CDT using the rv!identifier and an a!queryEntity call.

12 replies

stefanhelzle0001
Brainy
November 2, 2021

This is just a hint to use record type references WHEN passing individual fields. Appian will cast the record type to the data type in the process model automatically when you pass the whole record item.

mikes0011
mikes0011Answer
Brainy
November 2, 2021

It's a little silly, but as far as I've been able to tell you either have to construct the CDT manually by referencing all fields manually, OR (and slightly easier) query the CDT using the rv!identifier and an a!queryEntity call.

The Expression Guru
andrewh0007
November 2, 2021

It's a little infuriating that the data is right there and you can reference each individual field but the entire record CDT is not made available. I know it used to be like this, I had hoped it had changed!

I personally prefer querying with the rv!identifier as a manually constructed CDT may require updating if the fields change and it's easy to forget.

mikes0011
Brainy
November 2, 2021

Yes, querying is my preferred method as well.  Another strength of this approach is that often a record type will (or at least can) be based on a specialized CDT / View that's fine-tuned just for use in the record type, but for a related action you might want to pass in the "normal" basic CDT from the table upon which the record type view is based.  That would be very cumbersome to do otherwise.

The Expression Guru
danny.verb
November 2, 2021

Part of the reason this is not supported for related actions at this time is because you can't use the Record Data type in process models. Your 'recordFullData' is a CDT and it's better to construct the CDT or query the row rather than rely on casting directly. 

If you look at Record Views, you can pass in the entire rv!record and it's encouraged! 

mikes0011
Brainy
November 3, 2021

I think the main point of frustration here is the lack of any apparent ability to directly cast between "record type" objects and objects of the matching CDT type.  It seems like this should be obvious functionality yet any attempts to do so end only in frustration - it makes me avoid using "record type" data for pretty much anything where i can avoid it.

The Expression Guru
walkersAuthor
November 3, 2021

Thank you for summarizing the issue Mike.  The record and CDT in the process are both the same CDT type.

walkersAuthor
November 3, 2021

Thank you all for your input, very helpful as always :).