Hi,
I have an interface A (form), that contains a sub interface B (grid).
When the user click on a checkbox row of the Grid in B, I can make some actions using the "selectionSaveInto" (ex: a!save(local!a, true) )
Is there any way to delegate (or inherit) this saving action to the parent form A ? (I would like Form A to be abble to catch this event and make the Save() )
In the case or local!a is a var that belongs to the form A, I would like to avoid to pass it to the Interface B.
Discussion posts and replies are publicly visible
Sure. Add a rule input to interface B of type save and make it an array. Then add this to the saveInto. Then you can pass any saving action from interface A into interface B using the new rule input. Give it a try.
That is great, I did not know there were a "Save" type for Rule input.
Thanks a lot Stefan.
Stefan, it works with a single value, but I may forgot something with an array.With 2 rule inputs passed in the Save rule input (saveActions), Appian takes only the first value.
In grid B, I set the 2 values like this :
selectionsaveInto: {
a!save(ri!saveActions, {12, 15}),
}
Am I missing something?
Your selectionSaveInto should look like
{ a!save( target: local!somethingLocal, value: "someValue" ), ri!saveActions }
Then you can pass a list of a!save() to ri!saveAction
but how do you do get back these values in form A?Do you just get an array of value proceeding like this?
In form A :
rule!My_SubGrid_B( saveActions: {local!var1, local!var2} )
In sub interface B (grid) :
selectionSaveInto { a!save(local!test1, "value1"), a!save(local!test2, "value2"), ri!saveActions}
In a saveInto, there is context. This is defined by the component. In a TextField, this is the entered text. In your case, this is the grid selection. To store something else, you define the list of a!save like {a!save(target: local!someVar, value: "someValue"}.
Does this help? Please elaborate about what your goal is.
I need to trigger an event when the user select a grid row (or select a inline checkbox).I do not need the Grid context, but just to call some "save actions" from Form A (not from the interface B).
I could do these actions in Grid B, but I preferer to call them from Form A, because the variables I'm using belongs to Form A.Example :When I select a grid row in sub interface B, I need to reinitialize some objects in Form A.
I'm sorry if I am not very clear.
Then passing {a!save(target: local!formAVar: value: null)} to your saveActions will store null to the local variable in form A.
Yes exactly, I've tested it yesterday and this works well for a single value.
but I was not sure to use it correctly.
Thank you Stefan