<?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 condition with another condition inside the result part.</title><link>https://community.appian.com/discussions/f/general/22701/if-condition-with-another-condition-inside-the-result-part</link><description>Hello, 
 I am thinking how I can achieve something like this with seal only, 
 
 
 
 
 
 basically if condition for null value, if it is null exit, if it is not null do action and that check next value, problem is that in the if there are condition, true</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: If condition with another condition inside the result part.</title><link>https://community.appian.com/thread/88830?ContentTypeID=1</link><pubDate>Wed, 08 Dec 2021 20:25:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:898eea29-361d-460c-88da-bc027d3b666e</guid><dc:creator>Vladimir Vasilev</dc:creator><description>&lt;p&gt;hello Danny, this is being executed inside expression rule once the data is calculated is being passed to the RPA.&amp;nbsp; Replicating this in Process will generate many nodes not sure it this will be optimal.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: If condition with another condition inside the result part.</title><link>https://community.appian.com/thread/88829?ContentTypeID=1</link><pubDate>Wed, 08 Dec 2021 20:22:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5d21482c-db42-4f95-9f5f-55ad86ab42f4</guid><dc:creator>Danny Verb</dc:creator><description>&lt;p&gt;If you only need to use the Excel Tools plugin, look into running this expression within a process model instead of an RPA robotic process&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: If condition with another condition inside the result part.</title><link>https://community.appian.com/thread/88828?ContentTypeID=1</link><pubDate>Wed, 08 Dec 2021 19:18:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a1667684-e4b1-4d40-b56a-cb56bee536d5</guid><dc:creator>Vladimir Vasilev</dc:creator><description>&lt;p&gt;I have chaged the code a little bit, so basicaly in this loop let&amp;#39;s say if on 4th iterration lecalid is null than the loop should stop.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(  
  local!countB: {30,31,32,33,34,35,36,37,38,39,40,41,42,42,44},
  local!data: 
  if(
    rule!LEGO_IsEmpty(excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {11}, columnNumbers: {2}, rowNumbers: {30})), 
    &amp;#39;type!{urn:com:appian:types:BTR}BTR_H1_1&amp;#39;(), 
     a!forEach(
      items: local!countB,  
      expression: &amp;#39;type!{urn:com:appian:types:BTR}BTR_H1_1&amp;#39;(
        id: fv!index,
        legalId: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {11}, columnNumbers: {2}, rowNumbers: {fv!item}),
        name: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {11}, columnNumbers: {3}, rowNumbers: {fv!item}),
        address: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {11}, columnNumbers: {6}, rowNumbers: {fv!item}),
        percentage: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {11}, columnNumbers: {9}, rowNumbers: {fv!item}),
        position: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {11}, columnNumbers: {10}, rowNumbers: {fv!item}),
      )
      )
  ),    
  local!data
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: If condition with another condition inside the result part.</title><link>https://community.appian.com/thread/88764?ContentTypeID=1</link><pubDate>Tue, 07 Dec 2021 22:56:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a888a858-b881-44d9-9704-f1c26aa400e8</guid><dc:creator>Josh</dc:creator><description>&lt;p&gt;If I am understanding you reqs right, it might be easier to have successive local variables:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
   local!isDataANull: rule!LEGO_IsEmpty(excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {3}, rowNumbers: {20})),
   local!dataA: if(local!isDataANull, 
    &amp;#39;type!{urn:com:appian:types:BTR}BTR_E_1&amp;#39;(), 
    updatedictionary(local!type, 
        {
          cas101: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {3}, rowNumbers: {20}),
          cas201: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {5}, rowNumbers: {20}),
          cas301: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {7}, rowNumbers: {20}),
          cas401: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {8}, rowNumbers: {20}),
          cas601: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {12}, rowNumbers: {20}),
          cas202: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {17}, rowNumbers: {20}),
          cas302: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {20}, rowNumbers: {20}),
        }
    )
   )    
  ),  
  local!dataB: if(or(isnull(local!isDataANull), isnull(/*your other condition)),
    null,
    rule!yourLogicRuleForDataB)
   ),
   /*Do Something with local DataB*/
 )&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: If condition with another condition inside the result part.</title><link>https://community.appian.com/thread/88759?ContentTypeID=1</link><pubDate>Tue, 07 Dec 2021 18:02:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e8b7abbd-f423-4073-b8ff-d5bada9e9db0</guid><dc:creator>Vladimir Vasilev</dc:creator><description>&lt;p&gt;example of the goal:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
   local!data: 
  if(
    rule!LEGO_IsEmpty(excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {3}, rowNumbers: {20})), 
    &amp;#39;type!{urn:com:appian:types:BTR}BTR_E_1&amp;#39;(), 
      a!localVariables(
        local!data: updatedictionary(local!type, 
        {
          cas101: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {3}, rowNumbers: {20}),
          cas201: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {5}, rowNumbers: {20}),
          cas301: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {7}, rowNumbers: {20}),
          cas401: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {8}, rowNumbers: {20}),
          cas601: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {12}, rowNumbers: {20}),
          cas202: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {17}, rowNumbers: {20}),
          cas302: excelreadcellsbynumber(excelDoc: ri!document, sheetNumbers: {10}, columnNumbers: {20}, rowNumbers: {20}),
        }
        ),
        if()
      )    
  ),  
  local!data
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: If condition with another condition inside the result part.</title><link>https://community.appian.com/thread/88758?ContentTypeID=1</link><pubDate>Tue, 07 Dec 2021 17:53:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:94cbb602-d37a-4824-9d82-569dc3435264</guid><dc:creator>Vladimir Vasilev</dc:creator><description>&lt;p&gt;well it is actually not related to button press, it is one expression which is given certain data and have to check it all. lines of data, if the next line does not contains data stop iterations are this point.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: If condition with another condition inside the result part.</title><link>https://community.appian.com/thread/88757?ContentTypeID=1</link><pubDate>Tue, 07 Dec 2021 17:26:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:12ebaa27-8fd3-4e29-8a08-8f57d3272678</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Hi Vladimir, you should be able to achieve this but the solution will depend on where you are performing this and what it is doing.&amp;nbsp; Is this used for a!save() when a button is depressed or a field is changed, or what are we doing here exactly, etc?&lt;/p&gt;
&lt;p&gt;Some quick examples with saving data on button press, Submit 1 cascades the if() statements and Submit 2 separates them out independantly.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;a!localVariables(
  local!data1: null,
  local!data2: &amp;quot;test&amp;quot;,
  local!value1,
  local!value2,
  
  a!buttonLayout(
    primaryButtons: {
      a!buttonWidget(
        label: &amp;quot;Submit 1&amp;quot;,
        submit: true,
        saveInto: {
          if(
            isnull(local!data1),
            {}, /* do nothing */
            if(
              isnull(local!data2),
              {}, /* do nothing */
              a!save(local!value2,&amp;quot;test&amp;quot;)
            )
          )
        }
      ),
      a!buttonWidget(
        label: &amp;quot;Submit 2&amp;quot;,
        submit: true,
        saveInto: {
          if(
            isnull(local!data1),
            {}, /* do nothing */
            a!save(local!value1,&amp;quot;test&amp;quot;)
          ),
          if(
            isnull(local!data2),
            {}, /* do nothing */
            a!save(local!value2,&amp;quot;test&amp;quot;)
          )
        }
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: If condition with another condition inside the result part.</title><link>https://community.appian.com/thread/88751?ContentTypeID=1</link><pubDate>Tue, 07 Dec 2021 16:30:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5fa037ab-9c10-467a-a4e0-d2ad4d080f88</guid><dc:creator>Vladimir Vasilev</dc:creator><description>&lt;p&gt;One comment on the condition, the right functionality is inside the graphic in the code it is reversed, ignore that. if is null than result is null.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>