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
  • 0
    Certified Lead Developer
    Hi as per my understanding there are some differences between load and with and those are mention below:

    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.

    Similarly we have few more differences, and I recommend you to go through the appian documentation to learn about it in detail.

    Hope this will help you.
  • 0
    Certified Senior Developer
    in reply to aloks0189

    a very nice explanation ,thank you very much

Reply Children