<?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 JSL: Conditional Check on Grouped Data in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Conditional-Check-on-Grouped-Data/m-p/929256#M108660</link>
    <description>&lt;P class="[&amp;amp;:not(&amp;amp;:first-child):has(strong)]:mt-1"&gt;For a certain table, I want to determine if the string "CCCC" is contained within elements of column C. Normally, I would expect to use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;Contains(:C, "CCCC")&lt;/CODE&gt;.&lt;/P&gt;
&lt;P class="[&amp;amp;:not(&amp;amp;:first-child):has(strong)]:mt-1"&gt;However, in this scenario, column C is not just a simple column. I need to determine if "CCCC" exists in column C when column C is grouped by the values in column A and column B, and I need this check to be applied row by row.&lt;/P&gt;
&lt;P class="[&amp;amp;:not(&amp;amp;:first-child):has(strong)]:mt-1"&gt;When I asked a generative AI, it suggested&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;Group(:A,:B)&amp;amp;Contains(:C,"CCCC")&lt;/CODE&gt;, but this approach didn't work. Currently, I'm stuck with the following JSL script that didn't yield the desired result:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(
    Group(:A,:B)&amp;amp;Contains(:C,"CCCC"),1,
    0
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 06 Feb 2026 04:22:48 GMT</pubDate>
    <dc:creator>TamedZebra</dc:creator>
    <dc:date>2026-02-06T04:22:48Z</dc:date>
    <item>
      <title>JSL: Conditional Check on Grouped Data</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Conditional-Check-on-Grouped-Data/m-p/929256#M108660</link>
      <description>&lt;P class="[&amp;amp;:not(&amp;amp;:first-child):has(strong)]:mt-1"&gt;For a certain table, I want to determine if the string "CCCC" is contained within elements of column C. Normally, I would expect to use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;Contains(:C, "CCCC")&lt;/CODE&gt;.&lt;/P&gt;
&lt;P class="[&amp;amp;:not(&amp;amp;:first-child):has(strong)]:mt-1"&gt;However, in this scenario, column C is not just a simple column. I need to determine if "CCCC" exists in column C when column C is grouped by the values in column A and column B, and I need this check to be applied row by row.&lt;/P&gt;
&lt;P class="[&amp;amp;:not(&amp;amp;:first-child):has(strong)]:mt-1"&gt;When I asked a generative AI, it suggested&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;Group(:A,:B)&amp;amp;Contains(:C,"CCCC")&lt;/CODE&gt;, but this approach didn't work. Currently, I'm stuck with the following JSL script that didn't yield the desired result:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(
    Group(:A,:B)&amp;amp;Contains(:C,"CCCC"),1,
    0
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Feb 2026 04:22:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Conditional-Check-on-Grouped-Data/m-p/929256#M108660</guid>
      <dc:creator>TamedZebra</dc:creator>
      <dc:date>2026-02-06T04:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: Conditional Check on Grouped Data</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Conditional-Check-on-Grouped-Data/m-p/929269#M108661</link>
      <description>&lt;P&gt;If you are able to provide example table, with expected result it makes it usually much faster and easier to provide help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure if this is what you are looking for (r is the result column)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1770353369882.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/93192i8FF03C5E2DECADD0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1770353369882.png" alt="jthi_0-1770353369882.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Max(Contains(:Column 3, "CCCC") &amp;gt; 0, :Column 1, :Column 2)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Column 1 and Column 2 are the grouping columns and Column 3 has the string&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 04:51:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Conditional-Check-on-Grouped-Data/m-p/929269#M108661</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-02-06T04:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: Conditional Check on Grouped Data</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Conditional-Check-on-Grouped-Data/m-p/929297#M108666</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you for your continued support.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The issue has been resolved.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I regret my own inflexibility. I hope to absorb a great deal of knowledge from this community!Really Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 06:55:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Conditional-Check-on-Grouped-Data/m-p/929297#M108666</guid>
      <dc:creator>TamedZebra</dc:creator>
      <dc:date>2026-02-06T06:55:14Z</dc:date>
    </item>
  </channel>
</rss>

