Ah, sorry this took so long... here's my suggestion.
So that you don't have to do this in the screen itself every time you want to use it, I would suggest just adding some functions to your Genie skin's custom.js file. For example, maybe you'd want to add routines like this... just open up the custom.js file and add these on to the end.
Code: Select all
function zeroPad(num, digits) {
var str = num + ""; // force to a string
while(str.length < digits){
str='0'+str;
}
return str;
}
function getFormattedPro(fld1, fld2, fld3) {
return get(fld1)
+ zeroPad(get(fld2), 7)
+ zeroPad(get(fld3), 2);
}
These routines are similar to RPG subprocedures. They are routines you can call from JavaScript, pass parameters to them, and get back a result. The zeroPad() routine accepts a number whre the leading zeros have been supressed, and it pads it out with zeroes to the length you specify. The getFormattedPro() routine uses the zeroPad routine to format the Pro# that you mentioned. (Assuming I understood correctly, anyway.) You pass it the screen IDs of 3 fields, and it builds the formatted Pro#.
Once these are in your custom.js file, you'll need to click the "Refresh" button in Genie to reload and get the updated JAvaScript. (Or, clear the cache, then close the browser, re-open and run Genie again... this will also work. Or just wait until the cache reloads itself... but that could be time consuming if you are testing your work.)
Now that you have the new functions, change the directory in the Upload widget properties to something like this:
Code: Select all
script: getFormattedPro("I_3_15", "I_3_19", "I_3_27");
(Replace the I_3_xxx fields that I used above with the 3 fields you have on your screens for the parts of the Pro#)
Hope that makes sense...