Column data not updating through script until selected separatelyHello,
I'm having very curious issues that I haven't found within the JMP community yet. Using JSL, here's what's happening:
- Import dataset (dt)
- Correct values in :Col1
- Since I'm replacing the corrected values into the same cell they're read from, I'm using a for loop
- I have this same loop set up in other scripts. I've checked a few and they're working correctly still
- Use :Col1 in formula for :Col2
- :Col2 matched to join tables with dt.
- The joined table does not have :Col1
(after script completes)
- I notice, at a glance, that :Col1 hasn't updated
- I highlight the code in the script I created and run block separately & :Col1 updates, as it was supposed to in step 2
- Nothing was done differently except singling out the code to run separately.
- Values created by step 3 still have the unupdated values of :Col1, thus the join didn't work as intended
Since this issue seems to be isolated to the current script I'm working on, this is a real head scratcher, mainly because this is one of the very first blocks of code in the script. Before this there are column creations and column renamings being done. There aren't many of these either. About 20 lines of code between dataset import and this block of code.
Technically I'm having this problem all over my code in different ways, but the earliest instance is above. This "new" script is a copy of a known working script, but modified to pull data from a different source. There are differences between the data sources, and those are already accounted for. I'm having this issue for column deletion & other for loops. I've even recreated a portion of this script BOTH from scratch and another try from point-and-clicking and copying and pasting from the enhanced log. Everything has this issue. I'm thinking it must be something to do with the source (SQL server), but no one else is having this issue. I'm the only one pulling from the SQL server and using JMP however.
Any thoughts?
Automation and ScriptingData AccessData Blending and CleanupWindowsRe: Column data not updating through script until selected separatelyA hunch: try Wait(0) where you expect to see an update.

Re: Column data not updating through script until selected separatelyBesides trying Wait(0), if your table has formulas try using << Run formulas. This should force JMP to evaluate all pending formulas before script execution continues
dt << Run Formulas();

or even << Rerun formulas (though this should be unnecessary as it evaluates all formulas, even the ones not pending)
dt << Rerun Formulas;

Re: Column data not updating through script until selected separately@peng_liu @jthi Thank you! wait() worked! Right above the loop I describe above, there's a formula that's run to populate a column that's required for the loop. Thank you both!