I tried the following:this.rawValue = Table1.Row.instanceManager.count;and i tried...this.rawvalue = Table1.instanceManager.count;and the result was 1 for each script but my form has 47 rows (not repeating rows).
Thank you. I will give it a try. My concern is that the vValue will not find the largest number in the database column when each value starts with text ("T" or "F"). Example T1012 or F1013
I am mistaken. The script above is still not working correctly.radzmar: your script does not include "substr" - is it missing or can I use Number(vValue, 2, 5) the same way as substr ?
This is now working. Thank you to all the responders for helping me solve this issue.This works:while(!oDB.isEOF()){ if(xfa.record.DataConnection1.FileName.value > nMaxID) nMaxID = Number(xfa.record.DataConnection1.FileName.value.substr(1,12)); Test.rawValue = nMaxID; oDB.next();}Thank you!
radzmar,Your script does not have substr in it? Is it missing?The script is going out to the database and looking for the largest number. The numbers start with either "T" or "Y" so I need to have the script ignore the first text character and only look at the remaining numeric digits. I would thing...
substr appears to be a Formcalc method only - not JavaScript. Your suggestion stopped the error but it does not appear to be doing what i expected. Are you sure it can alos be used in JavaScript?