<?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 How do I use contains function to find a part of a variable name? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-use-contains-function-to-find-a-part-of-a-variable-name/m-p/526258#M75042</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to find a way to execute a function which happens when a list contains the string "[String]" like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AAList = {"object1", "object2", "object3[String]"};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If( Contains( AAList, "[String]"),&lt;BR /&gt;Show("string is running") );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the if function isn't executed because the contains function doesn't detect the "[String]".&lt;/P&gt;&lt;P&gt;Any way to solve this?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 17:05:20 GMT</pubDate>
    <dc:creator>PowerOx327</dc:creator>
    <dc:date>2023-06-09T17:05:20Z</dc:date>
    <item>
      <title>How do I use contains function to find a part of a variable name?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-contains-function-to-find-a-part-of-a-variable-name/m-p/526258#M75042</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to find a way to execute a function which happens when a list contains the string "[String]" like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AAList = {"object1", "object2", "object3[String]"};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If( Contains( AAList, "[String]"),&lt;BR /&gt;Show("string is running") );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the if function isn't executed because the contains function doesn't detect the "[String]".&lt;/P&gt;&lt;P&gt;Any way to solve this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:05:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-contains-function-to-find-a-part-of-a-variable-name/m-p/526258#M75042</guid>
      <dc:creator>PowerOx327</dc:creator>
      <dc:date>2023-06-09T17:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use contains function to find a part of a variable name?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-contains-function-to-find-a-part-of-a-variable-name/m-p/526273#M75043</link>
      <description>&lt;P&gt;Contains is looking for full matches from a list, that why it won't find the which is part of one of the items in the list [String]. You can convert the list to a string using Concat Items()&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

AAList = {"object1", "object2", "object3[String]"};

If(Contains(Concat Items(AAList, "¤"), "[String]"),
	Show("string is running")
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or loop over the list and break when match is found.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 08:21:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-contains-function-to-find-a-part-of-a-variable-name/m-p/526273#M75043</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-07-26T08:21:21Z</dc:date>
    </item>
  </channel>
</rss>

