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
Discussion posts and replies are publicly visible
OK. Did you try to cast() function?
will that be possible ? using cast()?
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.
You are correct ! I am also having similar confusion on this - But, why cast data to CDT to pass it into a write records node !?! Very confusing ...
docs.appian.com/.../Casting.html
Casting works fine provided that the fields are the same.
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?
The Requirement is 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
What issue are you facing in this? I guess you are clear about your requirement and you have already planned the process, You have been given an answer on how to cast from Record Type to CDT. The only question all of us in this section have is 'what are you doing with the casted data and why is it necessary?