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

JSL Tips and Tricks session on November 20th

Dear community, 

 

On November 20th, we'll be hosting a Scripters Club session on "Tips and Tricks." You can find more details and register here: https://www.jmp.com/en_gb/events/users-groups/users-group-meetings/register-for-scripters-club-2024....

 

We have a list of items we'd like to cover, but we'd also love to hear from you!

  • Is there anything you'd like to learn more about?
  • Are there specific challenges you face when scripting?
  • Do you have a tip you'd like to share with the community?

Thanks! 

@jthi,  @thickey1@Georg @maurogerber 

8 REPLIES 8
jthi
Super User

Re: JSL Tips and Tricks session on November 20th

Maybe I can give some possible ideas regarding the tips:

  • Re-ordering
    • Re-ordering associative array
    • Re-ordering columns based on some metric
  • Scripting Index tips and tricks
  • Finding references to display boxes
  • Extracting values between brackets
  • Getting unique values
  • Data table subscripting
  • Opening text as data table
  • Quotes in Run Command
  • Square brackets in regex
  • Escaping escapes
  • Randomizing things
  • Finding platform preferences from already open (report) windows
  • Getting possible combinations
  • "Testing" expression evaluation
  • SQL queries in JSL
    • Log Capture()
  • Referencing columns
    • Column()
    • Eval("name")
  • Enable "filter" for filter col selector
  • Making private tables visible
  • Batch Interactive
  • Checking for missing/empty/no items/...
  • ...
-Jarmo
hogi
Level XII

Re: JSL Tips and Tricks session on November 20th

- how to debug code in Application Builder

- How to debug code in a jsl file which is "included" in another file?

i.e. how to access the namespace.

 

efficient ways to work with JSL debugger :

do I have to start it every time "from scratch"? can I change values of symbols "on the fly" ? can I jump back to the start of function?

 

how to extract information from saved scripts. e.g. Variable or axis setting of Graph Builder Script

 

JSL and Workflow Builder?

how to handle the part of the workflow which is not recorded by Workflow Builder?

hogi
Level XII

Re: JSL Tips and Tricks session on November 20th

collection of some Tips and Tricks - best practice with JMP/JSLwhich I found in the community. 

I just added the most important one to the list:

hogi_0-1730277831096.png

 

hogi
Level XII

Re: JSL Tips and Tricks session on November 20th

wonderful tips and tricks with XPath:
https://community.jmp.com/t5/Abstracts/I-Can-See-It-How-Do-I-Get-It/ev-p/776041 

question: how to make XPath robust so that it works as well with local language settings?

Display Tree Indexing - how does it work? 

hogi_0-1730780141380.png

 

names default to here(1);
dt=Open("$SAMPLE_DATA/Quality Control/Coating.jmp");
obj=dt<<Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight, :Weight 2 ) ), Local data filter );
rpt=obj<<report;    

rpt["Control Chart Builder","Weight Limit Summaries"]; // works , even with local language settings - wow!!!
rpt["Qualitätsregelkarte erstellen","Übersicht Grenzen Weight"] // works - but just with German language setting

current report()["Local Data Filter"]; // works, but NOT with local, e.g. German language setting
current report()["Localer DatenFilter"]; // works - but just with German language setting

rpt << xpath("//OutlineBox[text()='Control Chart Builder']"); // works - but just with English language settings 

 

hogi
Level XII

Re: JSL Tips and Tricks session on November 20th

How do you solve this task?
is in spec(value) 

 

 

hogi
Level XII

Re: JSL Tips and Tricks session on November 20th

temporary variables in column formulas - used again in subsequent rows:

If(Starts With(:Column 1, "Header"),
	flag = :Column 1
);
flag;

@jthi in How to subset data with some headers in rows? 

hogi
Level XII

Re: JSL Tips and Tricks session on November 20th

(non-modal) dialog windows in sequential scripts

hogi
Level XII

Re: JSL Tips and Tricks session on November 20th

Log how a list is sorted:

Sort( {{111,1}, {212,2},{4,3}} )

- sorted by first entry

- send entry for the log