I have just upgraded to JMP 13 and it has made many custom scripts stop working. I have traced the problem to a change in how lists handle the result from a loc query. The code below used to return "pear" in JMP 12 but now returns {"pear"}.
mylist = {"apple","pear"};
mychoice = "pear";
showchoice = mylist[loc(mylist, mychoice)];I was using the list[loc()] syntax to create SQL comma separated strings to execute stored procedures.
The new behaviour is logical if unexpected. Regrettably Loc() still won't take a list argument as the look up value - that would have been a beneficial outcome. How would you recommend to get the desired result:
I could convert my list of choice(s) to a string and strip out the { & } & \!". This will not always work as the text list I show the user is not always the same as the list from which the corresponding key is picked for the SQL request.
I think that Loc() is supposed to take a matrix and return the location of true elements (non-zero).
Contains( list, item) works with lists and returns the location of the target item.
I think that Loc() is supposed to take a matrix and return the location of true elements (non-zero).
Contains( list, item) works with lists and returns the location of the target item.
This might be helpful: https://community.jmp.com/t5/Discussions/JSL-Matrix-List-Programming-Change-for-JMP-13/m-p/18784
This is abit like overfitting with predictive models. Your code is tuned to how JMP actually works as opposed to how it ought to work. Which is fine, until the next release :)