<?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>Question on if() function&amp;#39;s documented functionality</title><link>https://community.appian.com/discussions/f/rules/7616/question-on-if-function-s-documented-functionality</link><description>It appears that the if() function has some undocumented functionality: it can handle if-elseif-else structures with only one call to if() instead of several nested calls. I found this use case while looking through the objects in a Quick App -- have a</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Question on if() function's documented functionality</title><link>https://community.appian.com/thread/40480?ContentTypeID=1</link><pubDate>Fri, 16 Dec 2016 18:39:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4990b0b7-0fd3-4c98-bafe-a4ebd19f9acb</guid><dc:creator>vasilisg</dc:creator><description>sorry I made a syntax error:&lt;br /&gt;&lt;br /&gt;choose(wherecontains(a,{6,12,40,45}),&lt;br /&gt;      &amp;quot;a is 6&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &amp;quot;a is 12&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &amp;quot;a is 40&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &amp;quot;a is 45&amp;quot;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on if() function's documented functionality</title><link>https://community.appian.com/thread/40478?ContentTypeID=1</link><pubDate>Fri, 16 Dec 2016 18:37:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fd527b9e-ee4f-4567-bbd8-3cfdbc39e578</guid><dc:creator>vasilisg</dc:creator><description>Well when nested if&amp;#39;s check the same variable then it can be transformed into a switch case using the choose function, for example the following:&lt;br /&gt;&lt;br /&gt;if(a=6,&amp;quot;a is 6&amp;quot;,if(a=12,&amp;quot;a is 12&amp;quot;,if(a=40,&amp;quot;a is 40&amp;quot;,if(a=45,&amp;quot;a is 45&amp;quot;,null))))&lt;br /&gt;&lt;br /&gt;can be replaced with a more readable format like:&lt;br /&gt;&lt;br /&gt;choose(wherecontains(a),{6,12,40,45},&lt;br /&gt;          &amp;quot;a is 6&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &amp;quot;a is 12&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &amp;quot;a is 40&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &amp;quot;a is 45&amp;quot;&lt;br /&gt;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on if() function's documented functionality</title><link>https://community.appian.com/thread/31294?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 20:05:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e46341f9-b4c2-41dc-b150-6d08f809e64c</guid><dc:creator>John Rogers</dc:creator><description>Phil, &lt;br /&gt;I&amp;#39;d be interested to hear about the best practices violations you&amp;#39;ve mentioned finding. The Send Task model shares the same layout as the other process models, so I&amp;#39;m not sure what you&amp;#39;re referring to in that case.&lt;br /&gt;&lt;br /&gt;Some of the objects do not have descriptions because they would have been redundant with the object name. There are a few legitimately missing descriptions, which we&amp;#39;re in the process of adding, but not in the process models.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on if() function's documented functionality</title><link>https://community.appian.com/thread/31287?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 18:05:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a6afa31b-5fc6-4381-9631-8dcf0cb80c03</guid><dc:creator>PhilB</dc:creator><description>Actually, in addition two of them don&amp;#39;t have descriptions - another best practice breach.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on if() function's documented functionality</title><link>https://community.appian.com/thread/31285?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 18:03:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:389c4875-1f67-4147-9123-b32d9ba03937</guid><dc:creator>PhilB</dc:creator><description>From a quick look they seem ok, except the Send Task process model, which doesn&amp;#39;t quite maintain left-to-right flow.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on if() function's documented functionality</title><link>https://community.appian.com/thread/31284?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 17:55:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d899c677-7549-4a80-a27d-259581540dba</guid><dc:creator>John Stretton</dc:creator><description>Phil, what about the process models produced by a Quick App? Do they adhere to best practices?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on if() function's documented functionality</title><link>https://community.appian.com/thread/31283?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 17:44:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7ac2c37c-1702-42f8-a145-9a07f0480032</guid><dc:creator>PhilB</dc:creator><description>John, I noted the same. Frankly, I&amp;#39;m quite disappointed - unimpressed, even - with the quality of the code that is produced by a Quick App; it certainly wouldn&amp;#39;t pass any code reviews, and in places breaches Appian&amp;#39;s own coding standards and best practices. I&amp;#39;ll probably compile a list of what I see is wrong at some point, but right now it&amp;#39;ll take too long!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on if() function's documented functionality</title><link>https://community.appian.com/thread/31245?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 22:21:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5b59bb4e-cb7a-49f4-8c2b-4e621d91049c</guid><dc:creator>John Stretton</dc:creator><description>Thanks, Matt. Glad I asked -- it&amp;#39;s so useful that I was about to start implementing it in several places!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question on if() function's documented functionality</title><link>https://community.appian.com/thread/31244?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 22:14:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bcc91e2d-4fbb-4b92-b629-f89bc017a3f1</guid><dc:creator>Matt Hilliard</dc:creator><description>John, thanks for asking about this. Using more than three parameters with if() is not supported. The fact that Quick Apps generates rules that do this is an oversight that will be corrected in a hotfix.&lt;br /&gt;&lt;br /&gt;We&amp;#39;re very aware that having to nest if() functions to achieve if/elseif/else behavior is not ideal. We&amp;#39;re currently exploring ways to provide a better design experience for conditionals in a future release.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>