Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Verified Answer
Replies
8 replies
Subscribers
7 subscribers
Views
5036 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Anyone have a good example.explanation of load() versus with(). It's troubl
Richard
over 8 years ago
Anyone have a good example.explanation of load() versus with(). It's troubling me that I'm having challenges with this concept.
OriginalPostID-159281
OriginalPostID-159281
Discussion posts and replies are publicly visible
+1
praveenj
over 8 years ago
This should help.
forum.appian.com/.../Evaluation_Functions.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Reject Answer
Cancel
+1
sonalk
over 8 years ago
Hi Richard,
Refer these link, should help you understand the difference between load and with :
forum.appian.com/.../e-114257
forum.appian.com/.../SAIL_Performance.html
forum.appian.com/.../SAIL_Performance.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Reject Answer
Cancel
0
harshav
over 8 years ago
I could give some of the Main Definitions as well,
1. 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.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
harshav
over 8 years ago
Oops, Sonalk and Praveenj has given you the links itself may be that would help you more :)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
+1
Rahul Gundu
over 8 years ago
Hi richard,
load evaluate only once when form is loaded, and with evaluate for each user interaction with the components.
Cascading dropdown is a very good example, the first dropdown is in load and evaluates only once when the form is loaded, but second dropdown in with evaluate every time when user change the value in first dropdown.
forum.appian.com/.../SAIL_Recipes.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Reject Answer
Cancel
+1
harishn
over 8 years ago
Hey Richard, check if this is useful. Load works the first time when the component/form is loaded.
eg: =load(local!var2:1,load(local!var1:ri!input1,local!var3:var1+var2,
a!formLayout(label:"",firstColumnContents:a!textField(label:"Test it",
value:var3, saveInto:var1))))
In example the local!var3 is initialized once in inner load, and will only change if explicitly changed in the saveInto (which is not done). Thus the value never changes for new inputs. Now change replace inner load with 'with'. Then run it. You will see the value of local!var3 is computed every time you enter an input, That is with refreshes its initialization and runs functions/rules, every time a change occurs in any of its local values.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Reject Answer
Cancel
0
Richard
over 8 years ago
Wow, thanks everyone! Read these in reverse order so harishn's example helped immensely. I had read the evaluation functions, but it appears I need to tinker to learn. Awesome community, wish I could kudo you all.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
maheshp664
over 8 years ago
Very useful discussion. Thanks.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel