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:
- convert the Loc() result to a number?
- replace showchoice with showchoice[1] in my code?
- other?
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.