Skip to main content
pankajm0004
August 25, 2021
Question

Fetching values from record type into local variable

  • August 25, 2021
  • 4 replies
  • 2 views

I am working on a requirement where I need to show the read only grid to the user and user will be able to filter the data. I need to show the sum of filtered column values also to the user.

I was trying to cast the record type to CDT in the following way but it was showing castInvalid:

cast(
 typeof('type!{urn:com:appian:types:INV}CDT_NAME'()),
  recordType!recordName
)

4 replies

vinayp0002
August 25, 2021

Hello Pankaj,

You can cast in the following manner:

'type!{urn:com:appian:types:INV}CDT_NAME'(

field1: rv!record[recordType!recordName.field]

)

pankajm0004
August 25, 2021

Hi Vinay,

We cannot use rv!record inside rule. It gives the error - Could not find variable 'rv!record'

vinayp0002
August 25, 2021

This is specific if you are trying to create a record type and passing the cdt to your interface.

peter.lewis
Employee
August 26, 2021

I'm unclear what you are trying to do - it shouldn't be necessary to cast a records grid to a CDT to show what you need. Can you describe more about your use case? What is the expression for your grid? Can you give an example of showing "the sum of filtered column values" in you grid?