The associative array is saved in RAM Memory until the variable is cleared, or the Name Space it is in is closed or the JMP session is closed. What you might be seeing that makes you think the array is being saved, is a couple things.
- When you open the data table, it will show the values in the formula column that existed when the data table was saved. The formula is not run to achieve this, it appears that the last values are saved with the column. But if you attempt to add a new row to the data table, which will force the formula to run, there will be an error displayed.
- If you save and close the data table and then open it again, without closing out the JMP session, the formula may find the array still remaining in RAM memory. Thus, it allows the formula to run.
The way that I typically handle formulas that need such items as an Associative Array, is to add the creation of the array into the formula, executing it only when the formula is first run. A real simple example would be:
If the Associative Array is created with this formula.
myArray = associative array(:age << get values);
Then to make it work in a formula you would just specify to run this code only when the formula is running the first row, thus making it available to all of the rows
If( Row() == 1,
myArray = Associative Array( :age << get values )
);
With this JSL as the first item in your formula, the formula will work.
Jim