as title
Discussion posts and replies are publicly visible
You should consider changing the local variable to an interface variable. Local variables value can't be passed.
I never see interface value before only ri!value and local!value
but how to let ri!value get retrieve from another interface? I tried lots of times
how to let ri!value be retrieved from previous interface then passed to second interface?
for example the first interface fill a!save(target:ri!username,value:"SAAAAM"), then the second interface can retrieve like rule!interface1().username, is this ok?
You will likely need to map the rule inputs together from the child interface to the parent. For example, suppose you have a rule input for ri!case on the child interface. You will need to create a second rule input to match that on the parent interface and map them together like this:
rule!ChildInterface(case: ri!case)
Then, any changes you make in the child interface will also be saved to the parent.
But if i create ri!case at second interface how can i make sure it is not null, any interface create ri!value is null automatically right?
/*parent Interface*/
rule!childInterface( username:ri!username)
/*child interface - Create a rule input with name username*/a!buttonWidget( /*your code*/ saveInto:a!save(target:ri!username,value:"SAAAAM"))
immortalvirgil said:let ri!value be retrieved from previous interface then passed to second interface?
Can you clarify what you mean by terms like "previous interface" and "second interface"? This is not normal terminology in terms of Appian interfaces - for nested interfaces we refer to them as parent/child. For interfaces used in sequential steps (separate user input task nodes) of a process model, we would refer to them in context of their task instances (i.e. "pass data from one task to the subsequent task", etc). I honestly can't tell which (if either) of these you might be referring to here, and you haven't provided a whole lot of detail for us to judge by.
simply, how to make it like java be able transfer a variables belongs to one class to any class?
Whilst Appian is Java under the hood, you need to be aware of how data is passed between different type of Appian object.
For User Interface objects there is a single variable that is defined somewhere (it might be a local! variable or might be a process variable) and you pass references to that variable between user interface objects using rule inputs. Think of rule inputs as "pointers" (in Java terminology). They don't contain the value, the contain reference to a value.
I defer to the details in Stewart's answer; but i'll simply reiterate that this isn't really how variables work in Appian-internal context. There isn't really a "transfer a variable" functionality and I can't quite tell what normal Appian use case you're even trying to get at.