Portion of script not executing unless run after the factI have a portion of script I am using to recode columns in my table to change values from "X"s to 0. I got this portion of code to work (Thank you JMP Discussion Forums!!) when run separately from my main script. However, when I insert this into a larger script (even when at the very end) JMP does not execute my command. When the code was placed in the middle of my script everything after it did not run... so I moved it to the bottom of my main script but it still does not execute. Every time I highlight this portion and run it after the fact it does exactly what I want.
I tried implementing the wait(0);, changing from i to k, and using a Try statement as well around the For Each Row, but no luck. I am really scratching my head as to why it would only work after the fact. Suggestions?
//Recode columns in Yield Table to give "0" instead of X's
wait(0);
yieldcols = Yields << get column names;
For Each Row( For( k = 1, k <= N Items( yieldcols ), k++,
If( Is Missing( As Column( yieldcols[k] )[] ),
As Column( yieldcols[k] )[] = 0 ) ) );
ScriptingRe: Portion of script not executing unless run after the fact//Recode columns in Yield Table to give "0" instead of X's
yieldcols = Yields << get column names;
For( col = 1, col <= N Items( yieldcols ), col++,
For Each Row( If( Is Missing( As Column( yieldcols[k] )[] ), As Column( yieldcols[k] )[] = 0 ) )
);
Re: Portion of script not executing unless run after the factJust gave it a try. This does not work, even when run separately. The original script I have works, but only when run separately (after the fact, after the entire script is run and I Ctrl+R that one section).Re: Portion of script not executing unless run after the fact//Recode columns in Yield Table to give "0" instead of X's
yieldcols = Yields << get column names;
For( col = 1, col <= N Items( yieldcols ), col++,
For Each Row( If( Is Missing( As Column( yieldcols[col] )[] ), As Column( yieldcols[col] )[] = 0 ) )
);