Question on expected behavior when mapping rule parameters while calling sub-interface

#UserInterface
Hi All, I was designing a form where I came across this new or different behavior which I suspect to be a bug. This is related to the mapping of the rule parameters while calling a sub-interface.

I have 2 interfaces, one parent interface(TEST_Interface1) and one sub-interface(TEST_Interface2).
TEST_Interface1 contains two rule inputs : varA (Text) and varB (Text).
TEST_Interface2 contains two rule inputs : varA (Text) and varB (Text).

TEST_Interface2 contains 2 text fields using which I initialize the rule inputs varA and varB.
In TEST_Interface1, I am calling TEST_Interface2 and below goes the code snippet:
rule!TEST_Interface2(
varA: ri!varB,           /* Mapping varA in TEST_Interface2 to varB TEST_Interface1 */
varB: ri!varA                    /* Mapping varB in TEST_Interface2 to varA TEST_Interface1 */
),
          a!textField(          /* Displaying the changed variable value */
label: "Variable A",
labelPosition: "ADJ...

Additional Info.zip

OriginalPostID-208471

OriginalPostID-208471

  Discussion posts and replies are publicly visible

Parents
  • ...ACENT",
    value: ri!varA,
    readOnly: true
    ),
    a!textField(                    /* Displaying the changed variable value */
    label: "Variable B",
    labelPosition: "ADJACENT",
    value: ri!varB,
    readOnly: true
    )
    ---------------------------------
    In TEST_Interface2:
    a!textField(
    label: "Enter Value for Variable A",
    value: ri!varA,
    saveInto: {
    a!save(ri!varA,save!value)
    }
    ),
    a!textField(
    label: "Enter Value for Variable B",
    value: ri!varB,
    saveInto: {
    a!save(ri!varB,save!value)
    }
    )
    While mapping the parameters, I am mapping varB to varA and vice versa.
    In this case, it doesn't consider the parameter mapping which I have specified(i.e varA(TEST_Interface1) --> varB(TEST_Interface2) and varB(TEST_Interface1) --> varA(TEST_Interface2)).

    Instead it is mapping varA(TEST_Interface1) to varA (TEST_Interface2) and varB(TEST_Interface1) to varB(TEST_Interface2).

    But if I change the variable names i.e 4 distinct variable name...
Reply
  • ...ACENT",
    value: ri!varA,
    readOnly: true
    ),
    a!textField(                    /* Displaying the changed variable value */
    label: "Variable B",
    labelPosition: "ADJACENT",
    value: ri!varB,
    readOnly: true
    )
    ---------------------------------
    In TEST_Interface2:
    a!textField(
    label: "Enter Value for Variable A",
    value: ri!varA,
    saveInto: {
    a!save(ri!varA,save!value)
    }
    ),
    a!textField(
    label: "Enter Value for Variable B",
    value: ri!varB,
    saveInto: {
    a!save(ri!varB,save!value)
    }
    )
    While mapping the parameters, I am mapping varB to varA and vice versa.
    In this case, it doesn't consider the parameter mapping which I have specified(i.e varA(TEST_Interface1) --> varB(TEST_Interface2) and varB(TEST_Interface1) --> varA(TEST_Interface2)).

    Instead it is mapping varA(TEST_Interface1) to varA (TEST_Interface2) and varB(TEST_Interface1) to varB(TEST_Interface2).

    But if I change the variable names i.e 4 distinct variable name...
Children
No Data