<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Load() and with() function difference</title><link>https://community.appian.com/discussions/f/user-interface/11603/load-and-with-function-difference</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/109002?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 09:00:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:123f6572-e081-468a-ad91-a03feb81eed3</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;load() and with() are deprecated and replaced by a!localVariables().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/109000?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 08:33:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:25a8119d-9dd3-43c7-9acb-3e8b14d64b14</guid><dc:creator>DanyaObaidat</dc:creator><description>&lt;p&gt;a very nice explanation ,thank you very much&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/82329?ContentTypeID=1</link><pubDate>Fri, 04 Jun 2021 04:15:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:01c9f28d-e0fb-4c0d-be47-6ea3c285a11e</guid><dc:creator>Prakash </dc:creator><description>&lt;p&gt;Now it is even more easier&amp;nbsp;with a!localVariables()&amp;nbsp; .It does everything load() and with() does with an additional refresh option .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/82328?ContentTypeID=1</link><pubDate>Fri, 04 Jun 2021 04:00:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:05308e84-faaa-4956-9a65-657716102009</guid><dc:creator>Prakash </dc:creator><description>&lt;p&gt;Thanks for the clarification .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/56406?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 06:38:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e488380b-5e38-4b5e-97ae-8d3daa44c3c8</guid><dc:creator>namratak356</dc:creator><description>Hi Sounik,&lt;br /&gt;
&lt;br /&gt;
Load()--&amp;gt;Load variables are evaluated only once when the form loads .&lt;br /&gt;
whereas &lt;br /&gt;
with()--&amp;gt;with local variables are evaluated everytime user interacts with the page.&lt;br /&gt;
With ,local variables are used to create Dynamic SAIL Interface, One of the Best example of dynamic SAIL is Cascading dropdown&lt;br /&gt;
which means values of second dropdown depends on the value of first dropdown, in that case you will want to evaluate or fetch values from DB everytime user changes value in first dropdown.&lt;br /&gt;
this local variable should be inside with(),&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
Namrata&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/56402?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 05:00:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ce136983-81dd-45c8-bb99-e09e59ed9d62</guid><dc:creator>aratim</dc:creator><description>Hi Souvik,&lt;br /&gt;
&lt;br /&gt;
load() : It allows users to define multiple local variables inside the it. Local variable&amp;#39;s value is evaluated the first time the expressions is executed.&lt;br /&gt;
with() : It also allows you to define multiple local variables but the value of these variables will be calculated each time there is any change n the form / each time the expression is re-evaluated.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/56363?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 05:03:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d4db4eaf-80e5-4654-8eed-1b0497836d19</guid><dc:creator>krishnau3863</dc:creator><description>Hi souvik das,&lt;br /&gt;
&lt;br /&gt;
 load evaluate only once when form is loaded, and with evaluate for each user interaction with the components. &lt;br /&gt;
 Cascading dropdown is a very good example, the first dropdown is in load and evaluates only once when the form is loaded, but second &lt;br /&gt;
 dropdown in with evaluate every time when user change the value in first dropdown.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/56362?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 04:59:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d248cd13-6793-41ec-8914-2edc95c09f46</guid><dc:creator>Narmada</dc:creator><description>Load()-&lt;br /&gt;
 1) Define local variables within an expression for a SAIL interface &amp;amp; evaluate the expression with local variables. &lt;br /&gt;
2) Retrieve data sets once &amp;amp; not have to get multiple times in an expression.&lt;br /&gt;
3) We can also used to create variables that capturing  same data just like any other variable on a form. However, these variables only store data for a length the user is looking &amp;amp; interacting with a screen. When the user freshers or leaves screen the data in the local variables deleted.&lt;br /&gt;
With()-&lt;br /&gt;
1) Defines local variables within a function and evaluate the expression with the new variables.&lt;br /&gt;
2) It recalculates the local variable values each time the expression is re-evaluated.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/56361?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 04:47:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b7f38629-08fb-4612-bd44-3b230ee82353</guid><dc:creator>chandhinir</dc:creator><description>variables defined under load() can be used in a!save() but variables defined with() cant be used in a!save().&lt;br /&gt;
load()  variables  are used for sorting or paging through a grid.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/56359?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 04:34:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:256b4681-ed84-4ef3-9a97-8743d71bd102</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;load() =&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/18.2/fnc_evaluation_load.html"&gt;Load Function&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;with() =&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/18.2/fnc_evaluation_with.html"&gt;With Function&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Difference =&amp;nbsp;load evaluate only once when form is loaded, and with evaluate for each user interaction with the components.&amp;nbsp;&lt;br /&gt;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.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/51107?ContentTypeID=1</link><pubDate>Mon, 25 Dec 2017 08:05:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ab0ea67a-ec6c-4f74-96f8-3b21126becc2</guid><dc:creator>lokeshk</dc:creator><description>Load() calculates  local variables value only first time when the expression is evaluated and With() re-calculates local variable&amp;#39;s value when the expression is reevaluated&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/51104?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2017 23:41:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c3536e54-56a6-4786-9745-85e1ea35b415</guid><dc:creator>aloks0189</dc:creator><description>Hi &lt;a href="/members/souvikd"&gt;Souvik Das&lt;/a&gt;  as per my understanding there are some differences between load and with and those are mention below:&lt;br /&gt;
&lt;br /&gt;
1. You can define multiple local variable either Inside load() or with() but you can&amp;#39;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()&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
3. Performance wise load() is faster than with() because of only once execution.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Similarly we have few more differences, and I recommend you to go through the appian documentation to learn about it in detail.&lt;br /&gt;
&lt;br /&gt;
Hope this will help you.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/51101?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2017 21:03:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:eb115928-222f-4a7f-b01b-34aea3016c50</guid><dc:creator>saravanarajanj</dc:creator><description>Hi,&lt;br /&gt;
&lt;br /&gt;
variables declared inside load function - initiates once and value will be cached throughout the SAIL interface&lt;br /&gt;
&lt;br /&gt;
variables declared inside with function - can be initiated first and reevaluates each time based on the dynamic logic(s) in the SAIL interface&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/51097?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2017 15:48:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c2eaa0a9-88b7-4796-9ff4-ac2d8fcd4283</guid><dc:creator>Jamal Case</dc:creator><description>&lt;p&gt;Load() function= a local variable&amp;#39;s variable is only calculated the first time the expression is evaluated&lt;/p&gt;
&lt;p&gt;With() function= a local variable&amp;#39;s value is re-calculated when the expression is reevaluated&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please see these links:&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/17.4/fnc_evaluation_load.html"&gt;https://docs.appian.com/suite/help/17.4/fnc_evaluation_load.html&lt;/a&gt;&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/17.4/fnc_evaluation_with.html"&gt;https://docs.appian.com/suite/help/17.4/fnc_evaluation_with.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Load() and with() function difference</title><link>https://community.appian.com/thread/51096?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2017 15:32:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:90fc51f8-6562-4f0d-b6b3-1e67e114e09b</guid><dc:creator>jeromew</dc:creator><description>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.&lt;br /&gt;
&lt;br /&gt;
with() = load the locally declared variables each time there is a change in the form (such as field input).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;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 ? &amp;quot; = if the rule is setting a local variable then that&amp;#39;ll happen once. Using the same rule in the form to update the same local variable will update that variable. This is important for minimizing form operations (reduced load, increased performance) and is used often as a design paradigm.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>