cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
shampton82
Level VII

Return a selected column name from graph builder

Is there a way to return the selected column from the column list in graph builder when you run a script?  For example, if I were to have selected age in the column list:

shampton82_0-1604163474156.png

and then run a script, would I be able to get the age column name and use it?  The reason I ask is that I have "shortcut" scripts that help with data clean up.  I often see issue in graph builder and then run a script that asks me to select the column I want to modify, however this is actually redundant as I had already selected the column in graph builder.  So if I could have the script grab the name of the selected column in the graph builder column list I could avoid some extra input boxes and clicks.

 

Thanks for any ideas!

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Return a selected column name from graph builder

This JSL will return the value selected in a Graph Builder dialog box

variable = Current Report()[listboxbox( 1 )] << get selected;
Jim

View solution in original post

6 REPLIES 6
txnelson
Super User

Re: Return a selected column name from graph builder

This JSL will return the value selected in a Graph Builder dialog box

variable = Current Report()[listboxbox( 1 )] << get selected;
Jim
shampton82
Level VII

Re: Return a selected column name from graph builder

Perfect!  Thanks so much for a quick reply.

 

Have a good day!

shampton82
Level VII

Re: Return a selected column name from graph builder

Playing around with this, I am now wondering is there something similar for the column switcher box?

txnelson
Super User

Re: Return a selected column name from graph builder

  1. The same JSL will work if a Column Switcher is invoked.  It will return the selection from the Column Switcher.
  2. Do you understand what the line of JSL is doing?  
  3. I suggest that you read the documentation in the Scripting Guide, on Display Trees.
Jim
shampton82
Level VII

Re: Return a selected column name from graph builder

Thanks for the additional info and no I don’t understand it yet but plan on getting there. I’ll review the info you suggested. Thanks again.

Steve

Re: Return a selected column name from graph builder

To @txnelson's point, the documentation and the Scripting Index will inform you that the Column Switcher is an object with its own protocol, including the message << Get Current specifically for your need.

 

Screen Shot 2020-11-02 at 4.59.21 AM.png

Recommended Articles