<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Nested if Statement in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Nested-if-Statement/m-p/60255#M32855</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just want to make sure that the following nested if statement will function correctly. At the moment I'm getting an error so I thought it might be to do with the way I constructed my nested if statement:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If (ismissing(dt:newColumnName[k]), For Each Row(If(dt:colAutomatically &amp;lt;= colManually[k] &amp;amp; dt:colAutomatically &amp;gt;= colManuallyStart[k], dt:newColumnName = colInstructions[k], dt: newColumnName = colInstructions[k-1] || " &amp;amp; " || colInstructions[k]));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The if statement conidtion is:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(ismissing(dt:newColumnName[k])&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If this is true I want the following statement to run:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each Row(If(dt:colAutomatically &amp;lt;= colManually[k] &amp;amp; dt:colAutomatically &amp;gt;= colManuallyStart[k], dt:newColumnName = colInstructions[k]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If this is false I want the following statement to run:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt: newColumnName = colInstructions[k-1] || " &amp;amp; " || colInstructions[k]));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jun 2018 15:02:37 GMT</pubDate>
    <dc:creator>Jaz</dc:creator>
    <dc:date>2018-06-13T15:02:37Z</dc:date>
    <item>
      <title>Nested if Statement</title>
      <link>https://community.jmp.com/t5/Discussions/Nested-if-Statement/m-p/60255#M32855</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just want to make sure that the following nested if statement will function correctly. At the moment I'm getting an error so I thought it might be to do with the way I constructed my nested if statement:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If (ismissing(dt:newColumnName[k]), For Each Row(If(dt:colAutomatically &amp;lt;= colManually[k] &amp;amp; dt:colAutomatically &amp;gt;= colManuallyStart[k], dt:newColumnName = colInstructions[k], dt: newColumnName = colInstructions[k-1] || " &amp;amp; " || colInstructions[k]));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The if statement conidtion is:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(ismissing(dt:newColumnName[k])&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If this is true I want the following statement to run:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each Row(If(dt:colAutomatically &amp;lt;= colManually[k] &amp;amp; dt:colAutomatically &amp;gt;= colManuallyStart[k], dt:newColumnName = colInstructions[k]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If this is false I want the following statement to run:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt: newColumnName = colInstructions[k-1] || " &amp;amp; " || colInstructions[k]));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 15:02:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Nested-if-Statement/m-p/60255#M32855</guid>
      <dc:creator>Jaz</dc:creator>
      <dc:date>2018-06-13T15:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if Statement</title>
      <link>https://community.jmp.com/t5/Discussions/Nested-if-Statement/m-p/60258#M32856</link>
      <description>&lt;P&gt;The expression to be evaluated if the first argument evaluated to false was inside the For Each Row() function. This code structure should do what you want:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Is Missing( dt:newColumnName[k] ),
	For Each Row(
		If( dt:colAutomatically &amp;lt;= colManually[k] &amp;amp; dt:colAutomatically &amp;gt;= colManuallyStart[k],
			dt:newColumnName = colInstructions[k]
		)
	),
	dt:newColumnName = colInstructions[k - 1] || " &amp;amp; " || colInstructions[k]
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jun 2018 15:13:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Nested-if-Statement/m-p/60258#M32856</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-06-13T15:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if Statement</title>
      <link>https://community.jmp.com/t5/Discussions/Nested-if-Statement/m-p/60307#M32877</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply but I want the following statement:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt:newColumnName = colInstructions[k - 1] || " &amp;amp; " || colInstructions[k]; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to be inside the loop.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way around that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 09:08:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Nested-if-Statement/m-p/60307#M32877</guid>
      <dc:creator>Jaz</dc:creator>
      <dc:date>2018-06-14T09:08:33Z</dc:date>
    </item>
  </channel>
</rss>

