Convert XML Count Settings to DAT Count setiings ?
Posted: Tue May 27, 2014 7:05 am
Well I added an extra line at the top of the initial setting of the global value SwitchScript and then restarted the flow and it didnt error, so not sure if it set the default start value or not but then I made a simple test rename slow and set it to this ...
Rename Job - Affect job name for - ALL, Remember original name - NO, Files inside jobfolder - Leave alone, Action 1 - Add suffix, Act on - Filename proper, Suffix - Script expression Define - Enter a JavaScript expression that evaluates to a string value - 1)var cnt = s.getGlobalData("mycounter");
2) if (cnt == "") cnt = 1; else cnt = parseInt(cnt,10)+1;
3) s.setGlobalData("mycounter", cnt);
4) cnt.toString();
Looking close to a working solution ...
Rename Job - Affect job name for - ALL, Remember original name - NO, Files inside jobfolder - Leave alone, Action 1 - Add suffix, Act on - Filename proper, Suffix - Script expression Define - Enter a JavaScript expression that evaluates to a string value - 1)var cnt = s.getGlobalData("mycounter");
2) if (cnt == "") cnt = 1; else cnt = parseInt(cnt,10)+1;
3) s.setGlobalData("mycounter", cnt);
4) cnt.toString();
Looking close to a working solution ...