Skip to main content
yelsojuu723542
New Participant
Mar 13, 2024 5:28 PM UTC
Question

Change Record Type to CDT

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
Mar 13, 2024 5:47 PM UTC

OK. Did you try to cast() function?

karumurua531442
Participating Frequently
Mar 13, 2024 6:09 PM UTC

will that be possible ? using cast()? 

stefanhelzle0001
Brainy
Mar 13, 2024 6:30 PM UTC

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
Mar 13, 2024 9:56 PM UTC
mathieud0001
Genius
Mar 14, 2024 12:43 AM UTC

Casting works fine provided that the fields are the same.

konduruc733182
Inspiring
Mar 14, 2024 4:48 AM UTC

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?