<?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 can we assign a boolean value to null</title><link>https://community.appian.com/discussions/f/user-interface/33884/how-can-we-assign-a-boolean-value-to-null</link><description>if the outageEligible (boolean) is false , then I need to null the value for outage(boolean) 
 if(rule!GBL_isnull(ri!outageEligible,false()) , a!save(ri!ouage,null(), a!save(null(),null())) 
 above is the code , I am using. But it is not working</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How can we assign a boolean value to null</title><link>https://community.appian.com/thread/129054?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2024 21:32:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2cbdd028-c59c-4529-a6d7-3d969bc82f7e</guid><dc:creator>Abhay Dalsaniya</dc:creator><description>&lt;p&gt;Anything other than true (including null) evaluates else block.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can we assign a boolean value to null</title><link>https://community.appian.com/thread/128972?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2024 20:00:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:679595be-a4ca-4313-bc71-c37ecc62d763</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;I wish every function in Appian was designed this way, but sadly it varies. So this is a standard practice I use every time when dealing with booleans.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can we assign a boolean value to null</title><link>https://community.appian.com/thread/128971?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2024 19:55:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:812db14d-bb2b-46d4-987c-d4c6771b0387</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;if() treats null just like false already.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can we assign a boolean value to null</title><link>https://community.appian.com/thread/128970?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2024 19:43:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1c62dee4-88e4-4b0e-95ad-6f2950415a35</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;or()&amp;nbsp;with booleans&amp;nbsp;is used to convert null into false.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can we assign a boolean value to null</title><link>https://community.appian.com/thread/128969?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2024 19:35:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c9a70869-0818-4455-891f-abf27c8ea6ee</guid><dc:creator>Abhay Dalsaniya</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(
  ri!outageEligible,
  {},
  a!save(ri!outage, null)
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can we assign a boolean value to null</title><link>https://community.appian.com/thread/128551?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 11:38:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:acf9d6e9-eab2-4b19-b717-3a153cf0a251</guid><dc:creator>preethas0001</dc:creator><description>&lt;p&gt;Thank you , this worked&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can we assign a boolean value to null</title><link>https://community.appian.com/thread/128550?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 11:38:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:134830c1-9f65-4ee8-b31d-a8e5d23fa118</guid><dc:creator>preethas0001</dc:creator><description>&lt;p&gt;Yeah , I am using into the saveinto of button widget&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can we assign a boolean value to null</title><link>https://community.appian.com/thread/128508?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2024 13:34:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fc31a0fc-979e-4e9f-9dd8-56c98e8ce1a0</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In your code, you are comparing a boolean with a boolean.&amp;nbsp;&lt;br /&gt;&lt;img style="max-height:28px;max-width:427px;" height="28" src="/resized-image/__size/854x56/__key/communityserver-discussions-components-files/13/pastedimage1706621574678v1.png" width="427" alt=" " /&gt;&lt;br /&gt;Instead, it could be further simplified as&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(
  or(ri!outageEligible),
  {},
  a!save(ri!outage, null)
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can we assign a boolean value to null</title><link>https://community.appian.com/thread/128507?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2024 13:29:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:df202ebf-f086-4b72-a3e2-63815425f15e</guid><dc:creator>Harshmodi</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;a!save&lt;/strong&gt;(&lt;span&gt;&amp;nbsp;target&lt;/span&gt;&lt;em&gt;, value)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In interface saveInto parameters, updates the target with the given value. Use a!save for each item that you want to modify or alter in a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code class="language-plaintext highlighter-rouge"&gt;saveInto&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;parameter. This function has no effect when called outside of a component (saveInto parameter).&lt;/p&gt;
&lt;p&gt;According to your question, you can give this a try based on my understanding:&lt;/p&gt;
&lt;p&gt;If outageEligible is false, save null in the outage rule input; otherwise, not&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(or(ri!outageEligible)=false,a!save(ri!outage,null),{})&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div data-unique="parameters"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can we assign a boolean value to null</title><link>https://community.appian.com/thread/128506?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2024 13:19:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:57472db8-fa06-4f05-bd68-6029faa5d7db</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a href="/members/preethas0001"&gt;preethas0001&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
[quote userid="75747" url="~/discussions/f/user-interface/33884/how-can-we-assign-a-boolean-value-to-null"]a!save(ri!ouage,null(), a!save(null(),null()))&amp;nbsp;[/quote]
&lt;p&gt;Is your rule input named the same? Why do you have a second a!save(null(),null()) which does not make any sense.&lt;br /&gt;&lt;br /&gt;Also can you share your code properly and the button widget code.(Hope you are using this logic in a saveInto parameter)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can we assign a boolean value to null</title><link>https://community.appian.com/thread/128505?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2024 13:19:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cb3fb5d9-6607-4f81-b98b-2596fa3b0b2d</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;I tried to turn your code into a more readable version.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(
  rule!GBL_isnull(ri!outageEligible,false()),
  a!save(
    target: ri!ouage,
    value: null()
  ),
  a!save(
    target: null(),
    value: null()
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Not sure what you are trying to do here, or where this code snippet is used.&lt;/p&gt;
&lt;p&gt;Maybe something like this might work better:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(
  rule!GBL_isnull(ri!outageEligible,false()),
  a!save(
    target: ri!ouage,
    value: null()
  ),
  {}
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>