I am trying to understand when the appian save data type should be used, reading the documentation I do not see a clear example of use. Can someone tell me if they use it and when? This is the associated documentation
https://docs.appian.com/suite/help/24.4/using_interfaces_in_appian.html#creating-reusable-custom-components
docs.appian.com/.../Appian_Data_Types.html
Discussion posts and replies are publicly visible
I use the "save" datatype when I want to expose a functionality like the Appian default components in the saveInto parameter.
Find an example in my blog post: https://appian.rocks/2023/12/04/the-master-of-email-address-fields/
I still don't understand its use, why not use a variable of the specific type that is expected to be stored in ri!saveInto instead of using the save data type?
There will be cases where you need to manipulate or conditionally handle some operations based on the input. Instead of using an additional variable to save the value and handle it based on that, you can use save!value.
It simplifies the process of saving or manipulating the user input in the interface by providing direct access to the value.
Example:
a!save(local!email, if(isnull(save!value), "No Email Provided", save!value))
Because I can then pass a list of a!save() to that parameter to allow reacting on events from outside of the component. That what makes this customizable.
If you want to save value after clicking on button or else choosing option in dropdown will use a!save() function.simply it saves the value in target.if you want to save same value whatever user provided/selected you can use a!save(local!test,save!value)or else you want to save different value after clicking on the submit button.
saveInto:{ri!button,
a!save(local!test,null)
}it means local variable test updated with null value user clicks on the submit button.
Thank you so much for answering, you saved my day.