Suppose,
I have created one local variable abc storing CDT:
local!abc: 'type!{urn:com:appian:types}Monitoring_Roster'(),
Now I want to store only 2/5 columns of this CDT in seperate local variable, How can I do it?
Discussion posts and replies are publicly visible
There are a few ways to do this, might depend on your use case (?) and Appian version for which method to use. First, you could take the fields you want and generate a local variable using a!map() (change to regular dictionary {} if not on a late version of Appian):
a!localVariables( /*local!abc: 'type!{urn:com:appian:types}Monitoring_Roster'(),*/ local!abc: { field1: "a", field2: "b", field3: "c", field4: "d", field5: "e" }, local!xyx: a!map( field1: local!abc.field1, field3: local!abc.field3, field5: local!abc.field5 ), { local!xyx } )
Or, utilize a local variable of the same type and only populate certain fields:
a!localVariables( local!abc: 'type!{urn:com:appian:types}Monitoring_Roster'(/* populated data */), local!xyx: 'type!{urn:com:appian:types}Monitoring_Roster'( field1: local!abc.field1, field3: local!abc.field3, field5: local!abc.field5 ), { local!xyx } )
Please provide some additional details on your use case for more specific answers.
Thank you Chris.