Loop with incremental variable
I have test that loops around 50 times to examine a process under continuous use. The looping is no issue and has worked well on a couple of tests. However, I now need to increment data in a field that is required to be unique for every of the 50 'saves'.
I have used the project variable data table set to integer and populated the single column table with 50 integers, 54330, 54331 etc. However, when I run the script, I get a type mismatch error.
If I enter just one value in the variable with type as text and 54330 then the (first) loop runs. Going back to the data table and using type string, numeric only then I get the type mismatch message again.
The line of code is:
Aliases.browser.pageNeonCms2.formFormcancrecredit.panelColl.fieldsetTransaction.panel.Textboxslipnumber.SetText(Project.Variables.Slip_number);
Clearly, although it's a number that's required, it would seem to be in text format. So why won't data from the Variable Data set to string work?
Could I use an Array and For, Next type of thing directly in the JScript?
Thanks
David
- Try wrapping your variable in a call to aqConvert.VarToStr. that should convert whatever value to a string for SetText