Usage of Load()within with()

Hello Folks,

 

can anybody give me a use case/ scenario where load() function is used within a with() function.

 

Thanks In Advance.

 

Regards,

Amit

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Hi Amit,

    Here are my inputs on this.

    Analysis 1 :
    variables declared inside load function - initiates once and value will be cached throughout the SAIL interface
    variables .declared inside with function - can be initiated first and reevaluates each time based on the dynamic logic(s) in the SAIL interface.

    Analysis 2 :
    Load() function= a local variable's variable is only calculated the first time the expression is evaluated.
    With() function= a local variable's value is re-calculated when the expression is reevaluated .
    Please visit the below link :
    docs.appian.com/.../fnc_evaluation_load.html docs.appian.com/.../fnc_evaluation_with.html

    Analysis 3 :
    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).

    Analysis 4:
    Load() calculates local variables value only first time when the expression is evaluated and With() re-calculates local variable's value when the expression is reevaluated

    Analysis 5:
    Load is used in expressions for SAIL interfaces to allow for user interaction on the SAIL, such as sorting or paging through a grid.
    With() differs from the load() function because it recalculates the local variable values when the expression is re-evaluated.

    If an expression requires multiple evaluations of a complex value, you can use the with() function to define the value as a local variable, so it's only evaluated once.

    Analysis 6:

    Differences :
    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.Performance wise load() is faster than with() because of only once execution.
    3.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.

    Hope the above may help you to understand better regarding Load() & with().

    Thanks,
    Ravi.
Reply
  • 0
    Certified Lead Developer
    Hi Amit,

    Here are my inputs on this.

    Analysis 1 :
    variables declared inside load function - initiates once and value will be cached throughout the SAIL interface
    variables .declared inside with function - can be initiated first and reevaluates each time based on the dynamic logic(s) in the SAIL interface.

    Analysis 2 :
    Load() function= a local variable's variable is only calculated the first time the expression is evaluated.
    With() function= a local variable's value is re-calculated when the expression is reevaluated .
    Please visit the below link :
    docs.appian.com/.../fnc_evaluation_load.html docs.appian.com/.../fnc_evaluation_with.html

    Analysis 3 :
    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).

    Analysis 4:
    Load() calculates local variables value only first time when the expression is evaluated and With() re-calculates local variable's value when the expression is reevaluated

    Analysis 5:
    Load is used in expressions for SAIL interfaces to allow for user interaction on the SAIL, such as sorting or paging through a grid.
    With() differs from the load() function because it recalculates the local variable values when the expression is re-evaluated.

    If an expression requires multiple evaluations of a complex value, you can use the with() function to define the value as a local variable, so it's only evaluated once.

    Analysis 6:

    Differences :
    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.Performance wise load() is faster than with() because of only once execution.
    3.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.

    Hope the above may help you to understand better regarding Load() & with().

    Thanks,
    Ravi.
Children
No Data