Loops
Problem You need to execute some JSL more than once. Solution Use a for(...) or while(...) or one of the more exotic variations. The for loop is the most common way to repeat some s...
Craige_HalesProblem You need to execute some JSL more than once. Solution Use a for(...) or while(...) or one of the more exotic variations. The for loop is the most common way to repeat some s...
Craige_HalesProblem Suppose you prompt a user to make a selection. When you retrieve the values from the user, typically they are stored in a list. Now you need to select the data that matches the v...
Wendy_MurphreyProblem You need to use a username and password in your script and you use Windows. Solution Call powershell via RunProgram to store the password in the Credential Manager (search for ...
ihProblem You want to use a Slider Box to set a continuous value, and you want to see the current value as you move the slider. Solution Make a Slider Box and a Number Edit Box. Add a script ...
Craige_HalesProblem You need to build a custom calculator that displays a table of numbers based on several input values. Solution Use Number Edit Boxes to get the values and use the Set Function metho...
Craige_HalesWe are in the process of revamping the JSL Cookbook to give it broader appeal, make it better organized, and easier to use. The focus will be on short projects (recipes) to help you improve your JSL....
DonMcCormackProblem You need to insert the value of a variable into an expression without evaluating the whole code. Examples include: Writing column formulas using a script Writing scripts usi...
ihProblem You need to look at every element in an Associative Array Solution use the <<First and <<Next messages // load a table of elements dt = Open( "https://en.wikipedia.org/wiki/...
Craige_HalesProblem Suppose your data table has a set of rows selected. Now, you want to select rows from that selection that meet an additional condition. Solution The Select Where() message for...
Wendy_MurphreyProblem You have some code that you want to call from more than one place, maybe with different arguments. Solution Use a user written function, with parameters, local variables to keep the...
Craige_HalesProblem You have data in a Matrix and need a Data Table, or the other way 'round Data table or matrix? Solution There is a function, AsTable(), that makes a new data table from a matrix, a...
Craige_HalesProblem Concatenate data tables using Files in Directory, without using Multiple File Import Solution Use Files in Directory to make a list and Concatenate to put them togethe...
Craige_HalesProblem APIs and other machine generated code often delivers very complicated data structures. I found it helpful to have a tool that analyzes these structures and make them more accessible. Ideall...
bernd_heinenProblem REST interfaces are becoming more and more popular. Understanding this technique becomes very important for JSL programmers. Solution MapQuest uses this technique to provide i...
bernd_heinenProblem Find geo-codes for locations through the Service from MapQuest. Encapsulate the whole REST API functionality that is needed to get the location information from MapQuest. Solution T...
bernd_heinenProblem Determine distances, travelling times and complete routings between pairs of addresses. Encapsulate the whole REST API functionality that is needed to get the routing information from MapQu...
bernd_heinenProblem You have a 2D matrix. You used the Loc function to locate interesting elements, but Loc returned indexes for a 1D matrix. How can you convert the 1D indexes back to 2D indexes? Soluti...
Craige_HalesProblem I wanted to create this figure for a publication Solution To create the vertically oriented shaded/filled and truncated normal curves, I utilized the Polygon() graphics f...
MathStatChemProblem You know some C++ and have some idea what a C++ object is and need the 20 minute intro to JMP's scripting language. Solution There is a JMP scripting index on the Help menu...
Craige_HalesProblem If you need to open a file in an external program, typically the JSL Open() function will work for you. However, if you want to open a file type that JMP knows how to import, you will proba...
Justin_ChiltonProblem When creating user interfaces in JMP, you may want to add some background or foreground colors to your displays. However, with JMP 15's new support for macOS Dark Mode and Windows High Cont...
Justin_ChiltonProblem You have data in one or more lists or matrix vectors that you need to sort. Solution Use Sort List() or Sort List Into(), Rank(), or put the lists and vectors in a data table and sort it. ...
Craige_HalesProblem Suppose you wish to select rows in a data table that meet more than one condition. Or, maybe you want to select the rows that meet one of a few conditions. Solution The ...
Wendy_MurphreyProblem Problem 1: I need to get a list of the unique values in a data table column. Problem 2: I need to get a list of the unique values in a JSL data structure (list or matrix) Solut...
MathStatChemProblem You need to automate adding reference lines to a chart. Solution Use JSL to run a summary on the data. Take the summary values and insert them into the graph builder script. /...
Craige_Hales