how to update ri! from a sub-interface?

I have a parent interface that is calling a sub-interface. I want to use a!save() is this possible?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Yes, if you pass the ri! as a parameter of the rule that makes the sub-interface, then when you update the value inside that code, it will proceed to update it outside that code as well.  In your sub-interface, it can have a completely different name, but that's not recommended.  You have to a!save() into the name the parameter has in the sub-interface.

    It's actually VERY good practice to explicitly label all the ways the data flows down through the nested code then back up through the nested code.  Developers can track where a starting value comes from, and where a changed value ultimately goes.

Reply
  • 0
    Certified Lead Developer

    Yes, if you pass the ri! as a parameter of the rule that makes the sub-interface, then when you update the value inside that code, it will proceed to update it outside that code as well.  In your sub-interface, it can have a completely different name, but that's not recommended.  You have to a!save() into the name the parameter has in the sub-interface.

    It's actually VERY good practice to explicitly label all the ways the data flows down through the nested code then back up through the nested code.  Developers can track where a starting value comes from, and where a changed value ultimately goes.

Children
No Data