cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
jthi
Super User

JMP Scripting Index feedback and discussion

Disclaimer:

This will be a fairly lengthy post and took a fair bit time to write. It will also be a bit unstructured as I added more things when they came to my mind while writing it. These are all my own (strong) opinions based on my few years (4) of JMP usage. I have also a list of issues with JMP's Online Help page, but I try to avoid most of that feedback here.

 

JMP Scripting Index is great (and necessary) help when writing JMP Scripts. I even use it as general search for JMP features. I will divide this post to couple of different sections and might make Wish List item(s) based on the discussion here.

 

 

Scripting Index, JMP Help, Scripting Guide and JSL Syntax Reference

Which documentation should I rely on? All of these provide different/same information in different/same format. Also sometimes they have conflicting information (see Items() below for example). I would like JSL Syntax Reference and Scripting Index to have the same information. For example currently Scripting Index is lacking arguments and return information and you have to decrypt them from description.

 

Also the experience of using JMP Help online version's search is quite bad. Only reliable way to use it I have found, is to either first find the function/feature from Scripting Index and hope you have working Help button or in some cases Google Search with "jmp help search term" but this isn't too reliable. Searching the information from .pdf versions of Scripting Guide and JSL Syntax Reference is usually faster than just relying on online help pages search. If I for example try to find Remove From function by using JMP Help's search, it won't even be on the list.

 

Also I haven't really used JMP17's Search feature, but I think it isn't made for JSL purposes as it is context related.

 

Links for some of the documentation:

Scripting Guide (online), Scripting Guide (pdf) 

JSL Syntax Reference (online), JSL Syntax Reference (pdf) 

 

 

Scripting Index format

Is it really necessary to read "Description" to understand all the parameters and what is returned? Could they be added as their own bolded parts in similar manner as Version Added in JMP17?

Below is exceptional Paint example with Returns added (with missing words "a list"), in best case also Arguments should be there (and maybe even throws).

jthi_4-1671266440998.png

 

 

JMP parameter list description/format

Is there anything like this for JSL Parameter List (Visual Basic) as in is JSL parameter list syntax explained anywhere? When I started scripting I was fairly confused by some of these (also I would like to use same format when I write my own Custom Functions). For example what do |, <>, =, and so on mean? My guesses: | -> or, <> -> optional parameter, = -> default value.

 

How does user know what should be written out in the function call? How does user know default parameter values WITHOUT reading description every time. Below are some quick examples I know of:

 

Contains():

pos = Contains(x, item, <start=1>)

Parameter naming is definitely not the best here (x?) but otherwise it is quite ok. Default value for start is defined here but how does user know if start should be written out or not? Can it be skipped because it is written using = instead of () (which would make it a function?)?

 

Items():

wl = Items(<[first last]>, s, <delim>, <Include Boundary Delimiters(0|1)>);

 

Default value for delim? Should Include Boundary Delimiters be written out or not? What does it default to? What does [first last] mean? It is not explained in the documentation (which documentation I should use...?) Items(string, <delimiter>, <Include Boundary Delimiters(Boolean)>) it is even missing from Syntax Reference but found from Scripting Index. 

jthi_0-1671264612619.png

Is it being removed in future version of JMP (so I don't want to use it) because it is missing from documentation? Was it added recently so some documentation is just out of date (so I can use but, I just have no idea what it does without trying it out).

 

Hex():

h = Hex(value, <"integer">|<encoding="utf-8">|<Base(number)>,<Pad To(number>));

Default values? Why I don't have to write out encoding, but I have to write out Base and Pad To(at least based on Scripting Index example). Can I see this from brackets () after the parameter?

 

And there are many many more similar examples in Scripting Index.

 

 

Scripting documentation issue reporting

How should I report possible issues within Scripting Index (and other documentation)? Creating Wish List items or sending support tickets is out of question for this. I don't want to spam hundreds of messages to either place just to get some typo's fixed.

 

Quick example by using Remove From(), for starters the descriptions are different in Scripting Index and JSL Syntax Reference and JSL Syntax provides more information what the function does but lacks examples. Also the function descriptions are different in Scripting Index vs JSL Syntax Reference... and the functions should behave differently based on this?

Remove From( x, <i>, <n=1> ) vs Remove From(source, position, <n>),

First is saying that i and n are optional, but for some reason i has no default value (it seems to be -1).

Second one says that second argument is mandatory and n is optional with no default value.

 

Scripting Index (Remove From isn't supposed to return anything based on this?)

jthi_1-1671265158253.png

 

Online Syntax Reference has wrong information on Returns (it does return the removed items and modifies source in place).

jthi_2-1671265359398.png

 

 

-Jarmo
11 REPLIES 11
Craige_Hales
Super User

Re: JMP Scripting Index feedback and discussion

One of them is the example that was created for the function, and the other is the example that was created for the display box. They both show in the scripting index in the All Categories, only one or the other shows in the Functions or Display Boxes.

 

Yes, they should be combined. There are a bunch of these, and sometimes the better example is the one you don't find on the first try.

 

Three JSL Easter Eggs 

Craige
hogi
Level XI

Re: JMP Scripting Index feedback and discussion

I thought about my issues with the search function:
https://community.jmp.com/t5/Discussions/JMP-Scripting-Index-feedback-and-discussion/m-p/583011/high...

 

I think it's because of this:
- What I really want is: To select a specific object or display box in the list on the left

- But instead of scanning the list and selecting the correct entry manually, I am lazy and use the search function on the top

 ... which actually scans the whole scripting index and shows matches in the center

The good thing:  one of the entries corresponds to the "object" on the left and I can highlight and select it 

The bad thing: I have to get rid of the restriction by the search, so I have to remove the text in the search function.

 

With this insight:
Actually, for me it would help if there was a search field at the top of the list on the left with the functions/objects/displayBoxes.

 

So my question to the community?

same for you? would you benefit from a search filed?

 

I just tried to select any entry in the list and started typing. Sometimes this works as intended and the correct entry is marked - but often it gets trapped in a subtree. e.g. after typing "K":

hogi_0-1674321599935.png