Load() and with() function difference

 Can Somebody explain the conceptual difference between load() and with() function ? what if I use a rule which is declared inside load() function and again use it without load() function in a form , what will be the difference ? Can somebody explain please.

  Discussion posts and replies are publicly visible

Parents
  • load() = load the locally declared variables one-time when the task is issued. To update a load variable, a save event must save into the local variable.

    with() = load the locally declared variables each time there is a change in the form (such as field input).

    "what if I use a rule which is declared inside load() function and again use it without load() function in a form , what will be the difference ? " = if the rule is setting a local variable then that'll happen once. Using the same rule in the form to update the same local variable will update that variable. This is important for minimizing form operations (reduced load, increased performance) and is used often as a design paradigm.
Reply
  • load() = load the locally declared variables one-time when the task is issued. To update a load variable, a save event must save into the local variable.

    with() = load the locally declared variables each time there is a change in the form (such as field input).

    "what if I use a rule which is declared inside load() function and again use it without load() function in a form , what will be the difference ? " = if the rule is setting a local variable then that'll happen once. Using the same rule in the form to update the same local variable will update that variable. This is important for minimizing form operations (reduced load, increased performance) and is used often as a design paradigm.
Children
No Data