Adding a new NTE instead of overwriting

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Adding a new NTE instead of overwriting

  • Creator
    Topic
  • #51186
    Randall Constant
    Participant

      I have a project where that I need to add a new NTE in the OBR group, but I don’t want to overwrite any existing NTE’s in that group. How would one approach this in the engine?

    Viewing 3 reply threads
    • Author
      Replies
      • #69096

        You could do something like NTE(1). You can either hardcode the number if you know how many NTE segments there are, or you could use a loop to count and a loop variable to set the number like NTE(%s1).

        -- Max Drown (Infor)

      • #69097
        Keith McLeod
        Participant

          If yo use the iterate inside an xlate, the %s1 or whatever you define variable will contain the loop count.  You can add to it just outside and below the iterate.  For example:

          math add $%s1 =1 –> $%s1

          The $ symbols allows for access to the variables value.  Use is on both sides.

          just beyond the iterate

          copy ‘something’ –> 1(0).0(0).NTE(%s1)….

          I beleive the %s1 retains it value unless it is initialized by another iterate statement using %s1 as it variable.

        • #69098
          Tom Rioux
          Participant

            Keith and Randall,

            It appears that the iteration variable does not hold it’s value once you have completed the iteration.

          • #69099
            Randall Constant
            Participant

              Thanks to everyone! With your help I think I’ve got it.

          Viewing 3 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.