MoofuJJ Absent Member.
Absent Member.

Nested Loops in HPOO?

Hi all,


Im trying to implement a simple nested loop within HPOO and im running into some problems. Basically the pseudo code im trying to recreate in HPOO is:


for( int j = 0; j < 5; j++ )


      for( int i = 0; i < 10; i++ )


                      AddEmail( i + j * 10 ); Send();




Ther only problem im having is when i try to do mathmateical operations on flow variables. So, for example, im using Counters, and the resultText of Counters are strings. However when i parseint them, it adds on decimal places which i cant seem to get rid of, and so i am unable to use the resulting integer.


Has anyone made a nested loop in HPOO?

Labels (1)
Tags (2)
1 Reply
Absent Member.. Steve_Drummond Absent Member..
Absent Member..

Re: Nested Loops in HPOO?

You can't use the mathematics HPOO operations within the HPOO loop (../util/math and comparison/multiply)?


if you need to do it within the scriptlet


try {
  var myNumber = parseInt(counter); // where counter is your 'number' string
  myNumber = myNumber.toFixed(0); //remove the decimal place, rounds the number
} catch (e) {
  // error handling



The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.