Can we save the rules or values in with()?

a

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    If I understand the real meaning of the question, the answer is NOPE.

    You can CREATE variables in a with().
    You can INVOKE variables in a with().
    with() REEVALUATES variables.
    You can use with() variables wherever you want, except SAVE INTO or a!save().

    When you attempt to SAVE a variable or value to a with() local variable, you then reevaluate the entire form including the definition of the with variable. The with() then gets overwritten with the value determined by its specification, and the value you SAVED is lost.

    You can only use local variables configured in a load() as part of a saveInto: or a!save(). When those get SAVED into, they aren't immediately reevaluated and replaced, so the value you SAVED is maintained.

    If by SAVE you mean saveInto: or the a!save() function, no, you can't SAVE values in with().

Reply
  • 0
    Certified Lead Developer

    If I understand the real meaning of the question, the answer is NOPE.

    You can CREATE variables in a with().
    You can INVOKE variables in a with().
    with() REEVALUATES variables.
    You can use with() variables wherever you want, except SAVE INTO or a!save().

    When you attempt to SAVE a variable or value to a with() local variable, you then reevaluate the entire form including the definition of the with variable. The with() then gets overwritten with the value determined by its specification, and the value you SAVED is lost.

    You can only use local variables configured in a load() as part of a saveInto: or a!save(). When those get SAVED into, they aren't immediately reevaluated and replaced, so the value you SAVED is maintained.

    If by SAVE you mean saveInto: or the a!save() function, no, you can't SAVE values in with().

Children
No Data