<?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 nested</title><link>https://community.appian.com/discussions/f/user-interface/29431/if-nested</link><description>Hi. I have a doubt in nested if&amp;#39;s 
 here, if the first condition is true, then it will be return the statement &amp;quot;should be 18 digits&amp;quot;. If it&amp;#39;s false, I want null value to be returned. Since I am using nested if&amp;#39;s its returning &amp;quot;must be numerical and no</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: if nested</title><link>https://community.appian.com/thread/116629?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 17:01:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3fd6d340-7fe3-4b66-9f2a-5efffc28c3a5</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="154541" url="~/discussions/f/user-interface/29431/if-nested/116625#116625"]The problem with the above coding is, the second if is working as expected. But when the first if statement returns false[/quote]
&lt;p&gt;This is not possible.&amp;nbsp; As I explained &lt;a href="/discussions/f/user-interface/29431/if-nested/116627#116627"&gt;earlier&lt;/a&gt;, the second if() only ever executes when the top-level if() evaluates to FALSE.&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1689958674686v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I suggest you review and get more familiar with the precedence in which nested if() statements execute.&amp;nbsp; Namely, that they execute stricly in order from the top-most level, and any nested expressions will only ever be evaluated when the parent condition evaluates in such a way as to call that particular child path (i.e. either the &amp;quot;true&amp;quot; path or the &amp;quot;false&amp;quot; path).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if nested</title><link>https://community.appian.com/thread/116628?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 16:46:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:157476f4-72c6-4093-b90a-6d854715845e</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;It would help if you can describe what you are trying to accomplish (e.g., when should &amp;quot;..no more than 12 numbers&amp;quot; show?), and expand your and() statements.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Currently, your empty array (not null technically) would be returned in the situation where the first if() evaluates false &lt;em&gt;&lt;strong&gt;and&lt;/strong&gt; &lt;/em&gt;the second if() evaluates to true.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if nested</title><link>https://community.appian.com/thread/116627?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 15:43:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b50a1988-c83a-4456-a7fb-8ec5adec906a</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="154541" url="~/discussions/f/user-interface/29431/if-nested/116623#116623"]the second if is not working properly[/quote]
&lt;p&gt;To be clear, the second &lt;em&gt;if()&lt;/em&gt; will &lt;em&gt;&lt;strong&gt;only ever execute&lt;/strong&gt;&lt;/em&gt;&lt;strong&gt;&lt;/strong&gt; when the &lt;em&gt;first if() &lt;span style="text-decoration:underline;"&gt;resolves to FALSE&lt;/span&gt;&lt;/em&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If this is &lt;em&gt;not what you want to happen&lt;/em&gt;, then you will need to restructure your &lt;em&gt;if()&lt;/em&gt; nesting to flow logically per what you want to happen.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if nested</title><link>https://community.appian.com/thread/116626?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 15:34:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7e2700e9-d96f-40a7-85f1-7385c9c87c5d</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;You can try using not condition outside and or some other logic and achieve what you want&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if nested</title><link>https://community.appian.com/thread/116625?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 15:28:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:41f8cc72-78ac-4bab-91eb-321673d9ecb4</guid><dc:creator>hema.mathivathanan</dc:creator><description>&lt;p&gt;yes, adding to that When the second if condition is true I want null and when false &amp;quot;must be numerical and no more than 12 numbers&amp;quot; should be displayed.&lt;br /&gt;The problem with the above coding is, the second if is working as expected. But when the first if statement returns false, it&amp;#39;s displaying &amp;quot;must be numerical and no more than&amp;nbsp; 12 numbers&amp;quot; which&amp;nbsp; shouldn&amp;#39;t.&amp;nbsp;&lt;br /&gt;Hope I explained the problem clearly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if nested</title><link>https://community.appian.com/thread/116623?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 15:23:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:20cd8c92-0f4f-423c-9206-499fbdfcbfda</guid><dc:creator>hema.mathivathanan</dc:creator><description>&lt;p&gt;with the above code, the second if is not working properly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if nested</title><link>https://community.appian.com/thread/116619?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 15:14:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:54e17c3f-bebc-4c4a-9ec7-c98686f92821</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="154541" url="~/discussions/f/user-interface/29431/if-nested/116613#116613"]I need the second if too.[/quote]
&lt;p&gt;But that&amp;#39;s not what you said in your description.&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1689952376275v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if nested</title><link>https://community.appian.com/thread/116618?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 15:08:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3b812b12-6d25-44d0-9a49-dfe32c16ecd5</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;try something like this&lt;br /&gt;&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1689952087877v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if nested</title><link>https://community.appian.com/thread/116616?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 15:05:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d9945d67-5735-4c57-a5a1-c6f67a663fe3</guid><dc:creator>hema.mathivathanan</dc:creator><description>&lt;p&gt;In those conditions I am checking the length of the field based on the input&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if nested</title><link>https://community.appian.com/thread/116614?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 15:00:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:88a31c4a-fb70-4345-b4d1-7743cb4623f5</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;Can you tell what are you trying to check in the first and second &lt;strong&gt;and&lt;/strong&gt; conditions??&amp;nbsp;&lt;br /&gt;&lt;br /&gt;you can try swapping the if conditions and check it out. It might help. it could be something like&lt;br /&gt;&lt;br /&gt;if(&lt;/p&gt;
&lt;p&gt;and(),&lt;/p&gt;
&lt;p&gt;&amp;quot;must be numerical and no more than 12 numbers&amp;quot;,&lt;/p&gt;
&lt;p&gt;if(&lt;/p&gt;
&lt;p&gt;and(),&lt;/p&gt;
&lt;p&gt;&amp;quot;should be 18 digits&amp;quot;,&lt;/p&gt;
&lt;p&gt;{}&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if nested</title><link>https://community.appian.com/thread/116613?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 14:47:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1a1896e3-d82b-4550-8b1d-af3c0ed20476</guid><dc:creator>hema.mathivathanan</dc:creator><description>&lt;p&gt;I need the second if too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if nested</title><link>https://community.appian.com/thread/116612?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 14:45:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:32f26b9a-4551-42a1-a976-8075409c13c9</guid><dc:creator>harshjan</dc:creator><description>&lt;p&gt;Hey,&lt;br /&gt;If you simply want to return null for false then instead of using second if, just replace it by null.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>