<?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>if() function</title><link>https://community.appian.com/discussions/f/rules/24539/if-function</link><description>Could someone explain why the following code work without compiler errors? 
 
 
 
 I expect some kind of evaluation error, but it works just as the three lines starting on &amp;quot;isusernametaken&amp;quot; were an embedded if. 
 I saw that in one of the Appian courses</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: if() function</title><link>https://community.appian.com/thread/94889?ContentTypeID=1</link><pubDate>Tue, 10 May 2022 08:47:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:45d20618-4f5e-4640-922d-463a7e388bd8</guid><dc:creator>niteshsakpal</dc:creator><description>&lt;p&gt;I discovered the same last year, I sent email to Appian to ask if its right way to use it. They suggested not to use this functionality and use multiple if statements. Now we have a!match() function for the same functionality.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if() function</title><link>https://community.appian.com/thread/94838?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 14:11:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f3e3d898-2f5c-4a77-86fb-03f0fed32be7</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I &lt;strong&gt;&lt;em&gt;am&lt;/em&gt; &lt;/strong&gt;enjoying &lt;em&gt;a!match&lt;/em&gt;.&amp;nbsp; Even now I have a special app package wherein i&amp;#39;m tracking down all the sloppy uses of &amp;quot;choose()&amp;quot; in my system and swapping them out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if() function</title><link>https://community.appian.com/thread/94837?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 14:10:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:711024ef-21bc-4d31-8428-ed39f3ad7b93</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Another interesting thing about using &lt;em&gt;if(a, b, c, d, e, [..., ...])&lt;/em&gt; format is that it&amp;#39;ll break Appian in places that absolutely require &amp;quot;Design Mode&amp;quot; functionality - for instance, if you try to use it (pretty much anywhere) in the Record Grid Designer.&amp;nbsp; If you use it in a regular interface, it&amp;#39;ll cause Appian to refuse to switch back to Design Mode from Expression Mode (though some might see this as more of a &amp;quot;pro&amp;quot; than &amp;quot;con&amp;quot;, lol).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if() function</title><link>https://community.appian.com/thread/94834?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 14:05:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:30b1cff5-4a43-4d4e-bb53-101bc3bca2d2</guid><dc:creator>Luis Ripoll Morales</dc:creator><description>&lt;p&gt;Thank you Dave, understood!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if() function</title><link>https://community.appian.com/thread/94821?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 13:31:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c3095572-0045-4131-80ed-8b51ef9c12ca</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;As others have posted, a!match is basically the same thing in readable format.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if() function</title><link>https://community.appian.com/thread/94818?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 13:29:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1cc51204-270f-4bbf-99f7-3fc6e4333d3c</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;if() has hidden else if functionality in it.&amp;nbsp; What&amp;#39;s documented is:&lt;/p&gt;
&lt;p&gt;if(&lt;/p&gt;
&lt;p&gt;condition&lt;/p&gt;
&lt;p&gt;return if true,&lt;/p&gt;
&lt;p&gt;return if false&lt;/p&gt;
&lt;p&gt;)&lt;/p&gt;
&lt;p&gt;What you can do with it:&lt;/p&gt;
&lt;p&gt;if(&lt;/p&gt;
&lt;p&gt;condition1,&lt;/p&gt;
&lt;p&gt;return if condition1 true&lt;/p&gt;
&lt;p&gt;condition2 if condition1 false {else if}&lt;/p&gt;
&lt;p&gt;return if condition2 true&lt;/p&gt;
&lt;p&gt;return if condition2 false&lt;/p&gt;
&lt;p&gt;)&lt;/p&gt;
&lt;p&gt;Or you can do it with 7, 9, 11, 13.&amp;nbsp; Every odd input is another conditional until the very last one, what returns if they&amp;#39;re ALL false.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s way less keypresses, but gets dramatically unreadable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if() function</title><link>https://community.appian.com/thread/94814?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 13:11:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7aad1357-acaa-4490-9450-a93d4f735554</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;I believe this is the other post:&amp;nbsp;&lt;a href="/discussions/f/new-to-appian/24293/why-if-takes-more-arguments-than-3"&gt;https://community.appian.com/discussions/f/new-to-appian/24293/why-if-takes-more-arguments-than-3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Like others have said, the validation for if() is that it must accept an odd number of parameters (so technically it does accept more than 3). However, this behavior is undocumented and I don&amp;#39;t recommend using it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if() function</title><link>https://community.appian.com/thread/94798?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 09:25:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4b9e08c3-f75e-4cab-9916-7ff74aeb06c8</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;Lets say, as its not completely wrong in the sense that the rule is not technically breaking there is no error message.&lt;br /&gt;-&amp;gt;&amp;nbsp;&amp;nbsp;as far as i remember you reported that issue already?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if() function</title><link>https://community.appian.com/thread/94796?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 09:20:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:97bf7aa5-f758-4e3c-9256-46752a5c196c</guid><dc:creator>Luis Ripoll Morales</dc:creator><description>&lt;p&gt;Thank you Richard, but why it does not trigger an error or warning in rule designer?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if() function</title><link>https://community.appian.com/thread/94795?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 09:15:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:34be7e64-b93f-49b3-8cb6-780afa01d1de</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;if() has 3 parameter&lt;/p&gt;
&lt;p&gt;condition and true, false statement&lt;br /&gt;&lt;a href="https://docs.appian.com/suite/help/22.1/fnc_logical_if.html"&gt;https://docs.appian.com/suite/help/22.1/fnc_logical_if.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;if you like to use more&lt;br /&gt;check a!match()&lt;br /&gt;&lt;a href="https://docs.appian.com/suite/help/22.1/fnc_logical_match.html"&gt;https://docs.appian.com/suite/help/22.1/fnc_logical_match.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;-&amp;gt; this is just a kind of mistake in the appian course. at least unproper use.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>