<?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 Re: Can an If statement have an | in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Can-an-If-statement-have-an/m-p/117395#M39999</link>
    <description>&lt;P&gt;The | operator is a logical &lt;A href="https://www.jmp.com/support/help/14-2/conditional-and-logical-functions.shtml#2529817" target="_self"&gt;OR&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, in English your condition as you've written it is "if col is not ASSAY_PURITY &lt;EM&gt;OR&lt;/EM&gt; col is not TOTAL SUM then..." Since col can't be both of those values at the same time that condition will always be true. You want an &lt;A href="https://www.jmp.com/support/help/14-2/conditional-and-logical-functions.shtml#2495905" target="_self"&gt;AND&lt;/A&gt; between them which is the &amp;amp; operator.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( ((col != Column( "ASSAY_PURITY" )) &amp;amp; col != Column( "Total Sum" )),
	If( (col[theRow] &amp;gt; target &amp;amp; !Is Missing( col[theRow] )),
		result = "Fail"
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 20 Feb 2019 22:34:49 GMT</pubDate>
    <dc:creator>Jeff_Perkinson</dc:creator>
    <dc:date>2019-02-20T22:34:49Z</dc:date>
    <item>
      <title>Can an If statement have an |</title>
      <link>https://community.jmp.com/t5/Discussions/Can-an-If-statement-have-an/m-p/116913#M39997</link>
      <description>&lt;P&gt;I have the statement:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( ((col != Column( "ASSAY_PURITY" )) | col != Column( "Total Sum" )),
	If( (col[theRow] &amp;gt; target &amp;amp; !Is Missing( col[theRow] )),
		result = "Fail"
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;col is a variable tracking the column name.&amp;nbsp; I am checking to see if the column name is not equal to either Assay Purity or Total Sum.&amp;nbsp; If true then it will check against a limit and it is greater than the limit than the variable result will fail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you let me know if I can or cannot put the | or in the if statement.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:25:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-an-If-statement-have-an/m-p/116913#M39997</guid>
      <dc:creator>wjalford</dc:creator>
      <dc:date>2023-06-09T23:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can an If statement have an |</title>
      <link>https://community.jmp.com/t5/Discussions/Can-an-If-statement-have-an/m-p/117395#M39999</link>
      <description>&lt;P&gt;The | operator is a logical &lt;A href="https://www.jmp.com/support/help/14-2/conditional-and-logical-functions.shtml#2529817" target="_self"&gt;OR&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, in English your condition as you've written it is "if col is not ASSAY_PURITY &lt;EM&gt;OR&lt;/EM&gt; col is not TOTAL SUM then..." Since col can't be both of those values at the same time that condition will always be true. You want an &lt;A href="https://www.jmp.com/support/help/14-2/conditional-and-logical-functions.shtml#2495905" target="_self"&gt;AND&lt;/A&gt; between them which is the &amp;amp; operator.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( ((col != Column( "ASSAY_PURITY" )) &amp;amp; col != Column( "Total Sum" )),
	If( (col[theRow] &amp;gt; target &amp;amp; !Is Missing( col[theRow] )),
		result = "Fail"
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Feb 2019 22:34:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-an-If-statement-have-an/m-p/117395#M39999</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2019-02-20T22:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can an If statement have an |</title>
      <link>https://community.jmp.com/t5/Discussions/Can-an-If-statement-have-an/m-p/136349#M40022</link>
      <description>Jeff,&lt;BR /&gt;&lt;BR /&gt;Thank you. For some reason that logic did sit well in my head. After making the change it worked perfectly.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Wayne</description>
      <pubDate>Thu, 21 Feb 2019 13:36:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-an-If-statement-have-an/m-p/136349#M40022</guid>
      <dc:creator>wjalford</dc:creator>
      <dc:date>2019-02-21T13:36:21Z</dc:date>
    </item>
  </channel>
</rss>

