Load and with

Anybody can explain the difference between load and with functions?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer
    Hi tirumalar0001

    1. You can define multiple local variable either Inside load() or with() but you can't perform save operation over the variables which are defined inside with() whereas we can save the data into a variable which is defined inside load()

    2. Variables defined in load() instantiate for only once whereas variables defined in with() will be evaluated for each interaction on form, like sort, search, input a value in field etc. However forcefully you can dynamically change the value of the variables defined on load() as well.

    3. Performance wise load() is faster than with() because of only once execution.

    4. Any consistent values should be maintained in the variables defined in load() where as maintain those variables in with() which are expected to change its value based on given input.

    Regards,
    Krishna.
Reply
  • 0
    Certified Senior Developer
    Hi tirumalar0001

    1. You can define multiple local variable either Inside load() or with() but you can't perform save operation over the variables which are defined inside with() whereas we can save the data into a variable which is defined inside load()

    2. Variables defined in load() instantiate for only once whereas variables defined in with() will be evaluated for each interaction on form, like sort, search, input a value in field etc. However forcefully you can dynamically change the value of the variables defined on load() as well.

    3. Performance wise load() is faster than with() because of only once execution.

    4. Any consistent values should be maintained in the variables defined in load() where as maintain those variables in with() which are expected to change its value based on given input.

    Regards,
    Krishna.
Children
No Data