Hi All,
I have a CDT named as Process_data in which there is a field called buttonAction of type text. I am trying to map that cdt rule input to a text value as ri!process_data.buttonAction = "Submit", but receiving below error. Please suggest how do I cast and fix this issue. Thanks in advance.
Error: Expression evaluation error at function 'tostring' parameter 1 [line 66]: Could not cast from Text to Process_data. Details: CastInvalid
Discussion posts and replies are publicly visible
Where in the interface are you trying to "map" this value? If you are trying to save the value "Submit" into ri!process_data.buttonAction, try using an a!save(ri!proccess_data.buttonAction, "Submit")...if not, please provide more information.
Keep in mind that the equals sign "=" in Appian is only used for comparisons; it does not allow you to save or assign data to a variable. If you want to save something to a process variable, you will likely need to use the Data > Outputs tab. There you can define an expression for the value and a variable you want to save into. Please see the documentation on process models for more information: https://docs.appian.com/suite/help/latest/Process_Node_and_Smart_Service_Properties.html#node-outputs
If that doesn't work, can you please provide more information about your use case?
Hi Meena,
In a!buttonWidget(
label: "Submit",
value:"Submit",
saveInto:{
a!save( ri!process_data.buttonAction, save!value)
}
)
In above code, the value parameter, what ever text you enter, it will be saved to cdt column, when the button is clicked. Make sure your cdt column is string.