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
5042 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
Parents
+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
Reply
+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
Children
No Data