<?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/"><channel><title>KB-1098 Input variables named after SAIL keywords don't take the value that is assigned to them</title><link>https://community.appian.com/support/w/kb/321/kb-1098-input-variables-named-after-sail-keywords-don-t-take-the-value-that-is-assigned-to-them</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-1098 Input variables named after SAIL keywords don't take the value that is assigned to them</title><link>https://community.appian.com/support/w/kb/321/kb-1098-input-variables-named-after-sail-keywords-don-t-take-the-value-that-is-assigned-to-them</link><pubDate>Wed, 22 Feb 2017 22:05:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dd9ace3e-b7a7-40a5-9dcc-e0762938538d</guid><dc:creator>Nick Vigilante</dc:creator><comments>https://community.appian.com/support/w/kb/321/kb-1098-input-variables-named-after-sail-keywords-don-t-take-the-value-that-is-assigned-to-them#comments</comments><description>Current Revision posted to Appian Knowledge Base by Nick Vigilante on 2/22/2017 10:05:48 PM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;h2 id="symptoms"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;Input variables to SAIL interfaces sometimes don&amp;#39;t take the value that is assigned to them.&lt;/p&gt;
&lt;p&gt;An example of when this would happen is shown below,&lt;/p&gt;
&lt;pre&gt;a!buttonWidgetSubmit(
label: &amp;quot;Submit&amp;quot;,
style: &amp;quot;PRIMARY&amp;quot;,
value: &amp;quot;CLICKED&amp;quot;,
saveInto: ri!submit
)
&lt;/pre&gt;
&lt;h2 id="cause"&gt;Cause&lt;/h2&gt;
&lt;p&gt;If the input variable is named the same as a keyword and the assignment is done in a SAIL component where the keyword is present, the assigned value is not stored. Instead, the value of the keyword is stored into the variable.&lt;/p&gt;
&lt;p&gt;The value of &lt;code&gt;ri!submit&lt;/code&gt; will become &lt;code&gt;True&lt;/code&gt; when the submit button is clicked. This is because submit is a keyword of Boolean type for the Button component. Similar behavior will be seen if we used &lt;code&gt;ri!style&lt;/code&gt; instead. In that case, we would see the value PRIMARY.&lt;/p&gt;
&lt;h2 id="action"&gt;Action&lt;/h2&gt;
&lt;p&gt;To resolve this issue, perform one of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use a different name for the input variable that isn&amp;#39;t a keyword for that component.&lt;/li&gt;
&lt;li&gt;Use the &lt;code&gt;a!save&lt;/code&gt; function to do the assignment instead of doing simple assignment. For the above example, that implementation would look like this&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;a!buttonWidgetSubmit(
label: &amp;quot;Submit&amp;quot;,
style: &amp;quot;PRIMARY&amp;quot;,
value: &amp;quot;CLICKED&amp;quot;,
saveInto: a!save(ri!submit, save!value)
)
&lt;/pre&gt;
&lt;p&gt;A list of each of the keywords can be found in the &lt;a href="https://docs.appian.com/suite/help/latest/SAIL_Components.html"&gt;SAIL Components&lt;/a&gt; page.&lt;/p&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to all versions of Appian.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Last Reviewed: February 2017&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: interfaces, SAIL, application design&lt;/div&gt;
</description></item></channel></rss>