<?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 Transferring color in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Transferring-color/m-p/654156#M84346</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am building my knowledge of JMP and now find myself with a color problem.&amp;nbsp; I would like to transfer the color of each row from the Mean (Meeting Yield Target) cell to the Mean (Yield) cell in each row.&amp;nbsp; Is it possible to do this with a formula?&amp;nbsp; My scripting knowledge is limited to simple automation based upon code extracted from the log window.&amp;nbsp; If you have any simple ideas please share them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&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-inline" image-alt="FullSpectrum255_0-1688061876863.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54280iC0776E361A5AACBD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FullSpectrum255_0-1688061876863.png" alt="FullSpectrum255_0-1688061876863.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2023 18:10:44 GMT</pubDate>
    <dc:creator>FullSpectrum255</dc:creator>
    <dc:date>2023-06-29T18:10:44Z</dc:date>
    <item>
      <title>Transferring color</title>
      <link>https://community.jmp.com/t5/Discussions/Transferring-color/m-p/654156#M84346</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am building my knowledge of JMP and now find myself with a color problem.&amp;nbsp; I would like to transfer the color of each row from the Mean (Meeting Yield Target) cell to the Mean (Yield) cell in each row.&amp;nbsp; Is it possible to do this with a formula?&amp;nbsp; My scripting knowledge is limited to simple automation based upon code extracted from the log window.&amp;nbsp; If you have any simple ideas please share them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&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-inline" image-alt="FullSpectrum255_0-1688061876863.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54280iC0776E361A5AACBD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FullSpectrum255_0-1688061876863.png" alt="FullSpectrum255_0-1688061876863.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 18:10:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Transferring-color/m-p/654156#M84346</guid>
      <dc:creator>FullSpectrum255</dc:creator>
      <dc:date>2023-06-29T18:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Transferring color</title>
      <link>https://community.jmp.com/t5/Discussions/Transferring-color/m-p/654193#M84350</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/48527"&gt;@FullSpectrum255&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At this time, there doesn't seem to be a way to detect the color of a cell, only to color or clear the color of a cell.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An alternative might be to create a formula that colors the Mean(Yield) cells based upon the value of the Mean(Meets Yield Target) values. Interestingly, when I tried this approach either the numbers were fully erased, or only row 1 would be colored. I wonder if anyone else has tips to make the formula route work, because it's a better solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A slightly different approach that is a bit more work, long term, is just to script an if statement to color each cell according to&amp;nbsp;the Mean(Meets Yield Target) values.&amp;nbsp; Examples below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);

dt = current data table();

// Works, but you'll need to run the script every time you want the cells colored
for( i = 1, i &amp;lt;= N rows(dt), i++,
	if(
		:"Mean(Meets Yield Target)"n[i] == 1, :"Mean(Yield)"n &amp;lt;&amp;lt; Color Cells( "Green", i ),
		:"Mean(Meets Yield Target)"n[i] == 0, :"Mean(Yield)"n &amp;lt;&amp;lt; Color Cells( "Yellow", i ),
		:"Mean(Meets Yield Target)"n[i] == -1, :"Mean(Yield)"n &amp;lt;&amp;lt; Color Cells( "Red", i ),
	)	
);

/* Better solution, if if was fixed
dt:"Mean(Yield)"n &amp;lt;&amp;lt; Set formula(
	if(
		:"Mean(Meets Yield Target)"n == 1, :"Mean(Yield)"n &amp;lt;&amp;lt; Color Cells( "Green", row() ),
		:"Mean(Meets Yield Target)"n == 0, :"Mean(Yield)"n &amp;lt;&amp;lt; Color Cells( "Yellow", row() ),
		:"Mean(Meets Yield Target)"n == -1, :"Mean(Yield)"n &amp;lt;&amp;lt; Color Cells( "Red", row() ),
	)
);
*/&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Jun 2023 19:19:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Transferring-color/m-p/654193#M84350</guid>
      <dc:creator>StarfruitBob</dc:creator>
      <dc:date>2023-06-29T19:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Transferring color</title>
      <link>https://community.jmp.com/t5/Discussions/Transferring-color/m-p/654214#M84351</link>
      <description>&lt;P&gt;On a side note, the Scripting Index is a fantastic resource to brows through documented functions! A quick search for keywords usually helps narrow down the available functions that can be used for your task.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StarfruitBob_0-1688066432181.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54281iAD35D33064EF325E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StarfruitBob_0-1688066432181.png" alt="StarfruitBob_0-1688066432181.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StarfruitBob_1-1688066508482.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54282i736FAF50EF025A06/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StarfruitBob_1-1688066508482.png" alt="StarfruitBob_1-1688066508482.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 19:22:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Transferring-color/m-p/654214#M84351</guid>
      <dc:creator>StarfruitBob</dc:creator>
      <dc:date>2023-06-29T19:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Transferring color</title>
      <link>https://community.jmp.com/t5/Discussions/Transferring-color/m-p/654222#M84352</link>
      <description>&lt;P&gt;Thank you StarfruitBob.&amp;nbsp; The script applies the same color coding by value perfectly.&amp;nbsp; 110% better than highlighting them with red boxes by hand in powerpoint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks 1e6.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 19:44:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Transferring-color/m-p/654222#M84352</guid>
      <dc:creator>FullSpectrum255</dc:creator>
      <dc:date>2023-06-29T19:44:37Z</dc:date>
    </item>
  </channel>
</rss>

