Topic
  • 3 replies
  • Latest Post - ‏2012-12-10T14:20:39Z by SystemAdmin
a.mansoor
a.mansoor
17 Posts

Pinned topic Using an RPE variable as an Iterator

‏2012-11-26T15:29:16Z |
Hi All,

I need to iterate a variable to implement certain features in my RPE template. The problem I am encountering is that The variable does not increment as intended. instead the variable takes on some funny values. I assign it a value of zero initially. Then The value is incremented every time two other variables are equal. I found that I was doing this incorrectly initially because RPE treated the addition of X = X + 1 as a text concatenation rather than a mathematical addition. One of the threads on the forum mentioned that a multiplication operation in the assignment statement should get RPE to view the statement as a mathematical operation. The assignment statement is X = X*1+1. I attached the RPE template to this post. The variable that I need to increment is called Bookmarks in the template and it should be incremented in the fifth container counting from the top. I print its value in the very last row of the table (it is the last element in the template)
Updated on 2012-12-10T14:20:39Z at 2012-12-10T14:20:39Z by SystemAdmin
  • jnation
    jnation
    6 Posts

    Re: Using an RPE variable as an Iterator

    ‏2012-11-28T15:17:06Z  
    I increment my variables using by casting to a number first, for example 1+Number(traceCount)
  • a.mansoor
    a.mansoor
    17 Posts

    Re: Using an RPE variable as an Iterator

    ‏2012-11-28T23:25:06Z  
    • jnation
    • ‏2012-11-28T15:17:06Z
    I increment my variables using by casting to a number first, for example 1+Number(traceCount)
    Thanks jnation,
    That did the trick
  • SystemAdmin
    SystemAdmin
    1299 Posts

    Re: Using an RPE variable as an Iterator

    ‏2012-12-10T14:20:39Z  
    Hi,

    I use : parseInt(Numerotation)+1