Hi team,
There are two interfaces, namely interfaceA and interfaceB, and interfaceB is a sub-interface of interfaceA.
In the sub interfaceB, two localVariables are defined, namely b1 and b2.
In the parent interfaceA, there is a button. I want to implement a function. When the button in interfaceA is clicked, b1 and b2 in interfaceB can be operated.
How to achieve it?
Is there a recommended solution?
Thanks a lot!
Discussion posts and replies are publicly visible
Not sure what you mean with "operating a variable".
Read my blog post to understand data flow in interfaces: appian.rocks/.../
For example, save the value of b2 to b1, can we do it in interfaceA?
Like I describe in my blog post, you do not have access to local variables in sub-interfaces.
Variables have to be created on top and can be passed down through rule inputs.
Interface A (parent)
>> Interface B (child).
#1. To access local variables defined in A into B. Pass those local variables as a rule input to B.
#2. To access local variables defined in B back to A. Create rule input in B and save the B's local variables into rule input, so that can be accessed in A.
Please note, rule inputs are bi-directional it can be used to pass-on the data from parent to child as well as child to parent.
We cannot handle it through local variables. The name itself indicates that they are local, so we cannot access them globally or outside of that interface. If we need to pass or handle values from Interface A to Interface B, we need to create Rule Inputs. These rule Inputs will act as global variables to manage these situations. Or We need to pass these local variable values into the rule inputs of the B interface. By the end of this, we have to handle everything through rule inputs only.