<?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 Using JSL (xpath) to change text edit boxes within Cause and Effect Diagrams in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Using-JSL-xpath-to-change-text-edit-boxes-within-Cause-and/m-p/473822#M71860</link>
    <description>&lt;P&gt;I am trying to color the text edit boxes within my cause and effect diagram, but when I use the xpath function to grab a specific box, it always selects the whole diagram. Is there a more specific route to get the individual text edit boxes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;((dgram)[i])&amp;lt;&amp;lt; (xpath("//texteditbox")[i])&amp;lt;&amp;lt;select();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Sun, 11 Jun 2023 11:23:14 GMT</pubDate>
    <dc:creator>Raybob</dc:creator>
    <dc:date>2023-06-11T11:23:14Z</dc:date>
    <item>
      <title>Using JSL (xpath) to change text edit boxes within Cause and Effect Diagrams</title>
      <link>https://community.jmp.com/t5/Discussions/Using-JSL-xpath-to-change-text-edit-boxes-within-Cause-and/m-p/473822#M71860</link>
      <description>&lt;P&gt;I am trying to color the text edit boxes within my cause and effect diagram, but when I use the xpath function to grab a specific box, it always selects the whole diagram. Is there a more specific route to get the individual text edit boxes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;((dgram)[i])&amp;lt;&amp;lt; (xpath("//texteditbox")[i])&amp;lt;&amp;lt;select();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:23:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-JSL-xpath-to-change-text-edit-boxes-within-Cause-and/m-p/473822#M71860</guid>
      <dc:creator>Raybob</dc:creator>
      <dc:date>2023-06-11T11:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using JSL (xpath) to change text edit boxes within Cause and Effect Diagrams</title>
      <link>https://community.jmp.com/t5/Discussions/Using-JSL-xpath-to-change-text-edit-boxes-within-Cause-and/m-p/473846#M71862</link>
      <description>&lt;P&gt;You might explore the properties that are available for these text edit boxes. You can quickly, interactively explore them by right-clicking on the reveal button to the left of the outline box:&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="prop.PNG" style="width: 581px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/41234i42EA61C7A5609B43/image-size/large?v=v2&amp;amp;px=999" role="button" title="prop.PNG" alt="prop.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 17:53:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-JSL-xpath-to-change-text-edit-boxes-within-Cause-and/m-p/473846#M71862</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2022-03-28T17:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using JSL (xpath) to change text edit boxes within Cause and Effect Diagrams</title>
      <link>https://community.jmp.com/t5/Discussions/Using-JSL-xpath-to-change-text-edit-boxes-within-Cause-and/m-p/473891#M71868</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the main issue with your existing script is that the second &lt;FONT face="courier new,courier"&gt;[i]&lt;/FONT&gt; subscript should be outside of the parentheses:&lt;/P&gt;
&lt;PRE&gt;dt = Open( "$SAMPLE_DATA/Ishikawa.jmp" );
obj = dt &amp;lt;&amp;lt; Diagram( Y( :Child ), X( :Parent ) );
(obj &amp;lt;&amp;lt; XPath("(//TextEditBox)"))[9] &amp;lt;&amp;lt; Text Color("Red");&lt;/PRE&gt;
&lt;P&gt;With a constant, you *can* put the subscript directly in the XPath expression:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Ishikawa.jmp" );
obj = dt &amp;lt;&amp;lt; Diagram( Y( :Child ), X( :Parent ) );
(obj &amp;lt;&amp;lt; XPath("(//TextEditBox)[9]")) &amp;lt;&amp;lt; Text Color("Red");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But in your case, it is really sending a &lt;FONT face="courier new,courier"&gt;&amp;lt;&amp;lt;Subscript(XPath(),i)&lt;/FONT&gt; message to the report.&amp;nbsp; I am assuming that the subscript on your &lt;FONT face="courier new,courier"&gt;dgram[i]&lt;/FONT&gt; is intentional - do you have an array of Diagram objects?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 18:42:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-JSL-xpath-to-change-text-edit-boxes-within-Cause-and/m-p/473891#M71868</guid>
      <dc:creator>danschikore</dc:creator>
      <dc:date>2022-03-28T18:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using JSL (xpath) to change text edit boxes within Cause and Effect Diagrams</title>
      <link>https://community.jmp.com/t5/Discussions/Using-JSL-xpath-to-change-text-edit-boxes-within-Cause-and/m-p/473900#M71871</link>
      <description>&lt;P&gt;Since you're doing // instead of /. You're telling Xpath that you want ALL text edit boxes at any level.&amp;nbsp; You'd have to put filters on which text edit boxes you want.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance, here's one based off of the name that's in the text.&amp;nbsp;&amp;nbsp;&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 = Open( "$SAMPLE_DATA/Ishikawa.jmp" );
obj = dt &amp;lt;&amp;lt; Diagram( Y( :Child ), X( :Parent ) );
some_text = {"Time", "Splatter"};
for(i=1, i&amp;lt;=nitems(some_text), i++, 
	this_text = some_text[i];
	xp = "//TextEditBox[text() = '"||this_text||"']";
	(obj &amp;lt;&amp;lt; XPath(xp)) &amp;lt;&amp;lt; Text Color("Red");
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Mar 2022 21:03:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-JSL-xpath-to-change-text-edit-boxes-within-Cause-and/m-p/473900#M71871</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2022-03-28T21:03:57Z</dc:date>
    </item>
  </channel>
</rss>

