cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
shampton82
Level VII

How to use a variable with Outlinebox[ text()='text']

Hey everyone,

I'm having an issue with some code.  

MinParam=(report << XPath("//OutlineBox[text()='min']//OutlineBox[text()=mindist]//StringColBox[StringColBoxHeader[text()='Parameter']]"))<<get;

Here the variable is "mindist" and it equals "Normal 2 Mixtures".  However, I can't get it to work.

 

Any suggestions?

 

Thanks!

 

Steve

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How to use a variable with Outlinebox[ text()='text']

You could build it into the string

xpath_query = "//OutlineBox[text()='min']//OutlineBox[text()='" || mindist || "']//StringColBox[StringColBoxHeader[text()='Parameter']]";
MinParam = (report << XPath(xpath_query)) << get;

or maybe better is to use Eval Insert

xpath_query_template = "//OutlineBox[text()='min']//OutlineBox[text()='¤mindist¤']//StringColBox[StringColBoxHeader[text()='Parameter']]";
xpath_query = Eval Insert(xpath_query_template, "¤");
MinParam = (report << XPath(xpath_query)) << get;
-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: How to use a variable with Outlinebox[ text()='text']

You could build it into the string

xpath_query = "//OutlineBox[text()='min']//OutlineBox[text()='" || mindist || "']//StringColBox[StringColBoxHeader[text()='Parameter']]";
MinParam = (report << XPath(xpath_query)) << get;

or maybe better is to use Eval Insert

xpath_query_template = "//OutlineBox[text()='min']//OutlineBox[text()='¤mindist¤']//StringColBox[StringColBoxHeader[text()='Parameter']]";
xpath_query = Eval Insert(xpath_query_template, "¤");
MinParam = (report << XPath(xpath_query)) << get;
-Jarmo
shampton82
Level VII

Re: How to use a variable with Outlinebox[ text()='text']

Thanks @jthi !

That works!  I also realized that the name is different for the 3 mixtures in that it adds distribution to the end so that was probably the real issue but now I have more options to use.

shampton82_1-1732819150344.png

 

 

For option 2, what are these? 

"¤"

 

hogi
Level XII

Re: How to use a variable with Outlinebox[ text()='text']

hogi_0-1732821171323.png