<?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>How to set a value?</title><link>https://community.appian.com/discussions/f/data/19052/how-to-set-a-value</link><description>Hello Appian Community, 
 
 I am trying to set a value = to something else like a simple java statement x=fo but I keep getting false, 
 why is the default value for =, in appian == in java? 
 sorry for the noob question but, I have spent hours searching</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to set a value?</title><link>https://community.appian.com/thread/74730?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 17:46:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5f940fa4-d88a-4371-81fa-17f9b1dca69c</guid><dc:creator>kevinr0001</dc:creator><description>&lt;p&gt;thank you so much Peter!&amp;nbsp;&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f601.svg" title="Grin"&gt;&amp;#x1f601;&lt;/span&gt;&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f602.svg" title="Joy"&gt;&amp;#x1f602;&lt;/span&gt;&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f618.svg" title="Kissing heart"&gt;&amp;#x1f618;&lt;/span&gt;&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f601.svg" title="Grin"&gt;&amp;#x1f601;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;works perfectly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set a value?</title><link>https://community.appian.com/thread/74729?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 17:29:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:03240157-bb7e-401e-b1df-15c79f18fe91</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;What Danny described above is how you initialize a variable. However, in the use case you described, it looks like you want to save a value into a variable. The easiest way to do this is to use the a!save() function to define a target variable and the value you would like to save to the variable. I&amp;#39;d suggest trying something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;saveInto: {
  ri!var1,
  /* I&amp;#39;m assuming you always want to save the value of the first variable */
  /* or else your dropdown wouldn&amp;#39;t remember the value chosen by the user :) */
  
  a!save(
    target: ri!var2,
    value: null
  )
  /* You shouldn&amp;#39;t need any logic like an if() or isnull() here because you */
  /* would always want to save a null value for var2 when you update var1 */
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If this still doesn&amp;#39;t work, I&amp;#39;d also recommend looking at the recipe for a &lt;a href="https://docs.appian.com/suite/help/latest/recipe-configure-cascading-dropdowns.html"&gt;cascading dropdown&lt;/a&gt;&amp;nbsp;since that seems pretty similar to what you are trying to do!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set a value?</title><link>https://community.appian.com/thread/74727?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 17:18:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6271b4bc-5553-4a7e-b696-eb7add6b355e</guid><dc:creator>kevinr0001</dc:creator><description>&lt;p&gt;thanks for the reply,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am trying to link two dropdown&amp;nbsp; fields so that when I change one the other resets&lt;/p&gt;
&lt;p&gt;what I have currently is:&lt;/p&gt;
&lt;p&gt;saveInto: {&lt;br /&gt; if(isNull(ri!var2),&lt;br /&gt; ri!var1&lt;br /&gt; ri!var2:null&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;my logic if var2 is empty&lt;/p&gt;
&lt;p&gt;save var 1&lt;/p&gt;
&lt;p&gt;if not&amp;nbsp;&lt;/p&gt;
&lt;p&gt;clear var 2&amp;nbsp;&lt;/p&gt;
&lt;p&gt;figuring the user could just redo the value they put in and It would not crash like it currently does&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set a value?</title><link>https://community.appian.com/thread/74723?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 14:55:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:93c701ae-cf7b-4de1-ac68-feb6939362ff</guid><dc:creator>Danny Verb</dc:creator><description>&lt;p&gt;In Appian, local variables are set using colons, : . You can update the values using a!save() in certain components&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/20.1/enabling_user_interaction.html"&gt;https://docs.appian.com/suite/help/20.1/enabling_user_interaction.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For example&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
local!message: &amp;quot;Hello World&amp;quot;,
{
    a!textField(
        label: &amp;quot;Message&amp;quot;,
        value: local!message,
        saveInto: local!message
    )
}
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>