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 ...
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?
in the project I'm working, in the past they're using CDT'S as a traditional way,Now as an expansion to that I have to replace all those CDTs to RECORD types, such that the application's user screen performance will becomes better. so here in this example I changed the DETAILS type to Record. so that I have to make the changes in all nodes wherever the pv!DETAILS present.but I don't want to make changes everywhere and make it complex.instead, I just want the record type data to be inserted in to Record post submitting the form and then change the particular variable type to CDT, such that all other existing flows will not be disturbed..
You don't have change all the nodes. Just add one script task where you cast the record type to CDT and save in the same Process Variable (Type CDT) that is being used everywhere. Can follow the same in different processes where you are having this issue.But eventually you would end up Writing your Entity Expression as Query records and your all other CDT based expressions to Record Type. I would recommend not to delay the changes at all levels as you are trying to transition from CDT's to Record Types. This would avoid any failure of referenced Items in the Application.
YELSOJU UPENDRA CHARY said:but I don't want to make changes everywhere and make it complex.
For now it's gonna look complex and lot of work , But using records and entities together to achieve output , isn't it too much of work?? I call this as complex.
Still you want to go in that direction like everyone said cast() would help & you can query back using "Queryentity()" in a script task (No one said it so i'm adding it), simpler configuration but impacts a little to overall performance.