<?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: How do I compare column values in loop using indexed naming. in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-compare-column-values-in-loop-using-indexed-naming/m-p/192876#M41251</link>
    <description>&lt;P&gt;If you were using a formula to set the values, then you code would probably work.&amp;nbsp; However, since you are using Set Each Value, I assume that you need to specify the specific row value to do the calculation on.&amp;nbsp; The below script worked for me&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column( RamanPeakList[NameIndex] || " Peak",
	&amp;lt;&amp;lt;Set Each Value(
		If(
			Column( RamanPeakList[NameIndex] || " Peak Intensity" )[Row()] == Column(
				"Temp" || RamanPeakList[NameIndex]
			)[Row()],
			:Raman Shift
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 13 Apr 2019 21:39:32 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2019-04-13T21:39:32Z</dc:date>
    <item>
      <title>How do I compare column values in loop using indexed naming.</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-compare-column-values-in-loop-using-indexed-naming/m-p/192866#M41249</link>
      <description>&lt;P&gt;I am trying to create a column and assign that column a value to a column only when the values in two other columns are equivalent.&amp;nbsp;&amp;nbsp; I have to use indexed naming as I am in a loop and will not always know what the column name is or what the number is (see image below).&amp;nbsp; The script creates the new column but does not correctly evaluate my formula. &amp;nbsp;&amp;nbsp; Please help!&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;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="RamanFail.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/16882i63B161AEB7DEA2C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="RamanFail.png" alt="RamanFail.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-img-tmp-id-3"&gt;My Script:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt&amp;lt;&amp;lt; New Column(RamanPeakList[NameIndex] || " Peak", &amp;lt;&amp;lt;Set Each Value( 
			If( Column(RamanPeakList[NameIndex] || " Peak Intensity") == Column("Temp"||RamanPeakList[NameIndex]), 
			:Raman Shift)));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Apr 2019 21:01:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-compare-column-values-in-loop-using-indexed-naming/m-p/192866#M41249</guid>
      <dc:creator>lpatton</dc:creator>
      <dc:date>2019-04-13T21:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare column values in loop using indexed naming.</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-compare-column-values-in-loop-using-indexed-naming/m-p/192876#M41251</link>
      <description>&lt;P&gt;If you were using a formula to set the values, then you code would probably work.&amp;nbsp; However, since you are using Set Each Value, I assume that you need to specify the specific row value to do the calculation on.&amp;nbsp; The below script worked for me&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column( RamanPeakList[NameIndex] || " Peak",
	&amp;lt;&amp;lt;Set Each Value(
		If(
			Column( RamanPeakList[NameIndex] || " Peak Intensity" )[Row()] == Column(
				"Temp" || RamanPeakList[NameIndex]
			)[Row()],
			:Raman Shift
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Apr 2019 21:39:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-compare-column-values-in-loop-using-indexed-naming/m-p/192876#M41251</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-04-13T21:39:32Z</dc:date>
    </item>
  </channel>
</rss>

