Skip to main content
yelsojuu723542
March 13, 2024
Question

Change Record Type to CDT

  • March 13, 2024
  • 13 replies
  • 0 views

I Have a Requirement like, I have a Process Variable called 'DETAILS' which is of 'RECORD TYPE'.
post submitting a particular form the data will be writes to Records. Then I have to use a Script task in order to change the PV 'DETAILS' Type from Record to CDT and use the PV as a CDT type value for upcoming nodes 


13 replies

stefanhelzle0001
Brainy
March 13, 2024

OK. Did you try to cast() function?

karumurua531442
March 13, 2024

will that be possible ? using cast()? 

stefanhelzle0001
Brainy
March 13, 2024

Yeah ... well ... the description is not very clear and yes, why not? But, why cast data to CDT to pass it into a write records node !?! Very confusing ...

For me, the question is more, where to store that data? He will need a separate PV of that type, and then he could just assign the record type pv to the CDT type pv, and Appian will copy the values field-by-field.

davidj137213
Brainy
March 13, 2024
mathieud0001
March 14, 2024

Casting works fine provided that the fields are the same.

konduruc733182
March 14, 2024

As others mentioned cast() would work fine assuming you have fields configured properly. you can run this in a for each if you have multiple records that need to be changed to CDT. Why would you want to cast it to CDT? Are you having multiple databases that store same data? And why not records if you are already getting the record data. Wouldn't the write records do the same thing?