reference index of repeating segment in xlate

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf reference index of repeating segment in xlate

  • Creator
    Topic
  • #49907
    Gary Atkinson
    Participant

    Ok, I know this topic has come up before, but please amuse me  ðŸ˜†

    I need to reference a single instance of a repeating OBX segment.  My variable is %s1.  I need 51st index OBX segment (OBX|52) and grab some data out of field 5 of that index and copy the data to TXA:4.  I saw some old posts reference using $ in the variable, but I don’t “get it”.  Any help, greatly appreciated!!  8)

    Thanks!

    Gary

Viewing 2 reply threads
  • Author
    Replies
    • #64059
      John Hamilton
      Participant

      First if you know it is the 51’st segment why do you need a variable.

      would not something like 1(0).1(0).OBX(51) get you what you need ?

      Maybe I’m missing somthing there.

      But what I have done in the past which I think you are asking about is.

      something like this

      Math: add  

                    Inputs $%s2

                              =1

                    Output $%s2

      then in the address use that variable.

      1(0).1(0).NTE(%s2)  which got me to the correct repeating segment.

      Hope this helps.

    • #64060
      Gary Atkinson
      Participant

      John-

      Using OBX(51) worked, but wanted to see if there was a another way to do it.  I had a nice conversion with Jim and he mentioned setting another %s variable to to “51”.  If the position ever changes I just need to change the variable.  Using the ADD function seems like another one way to do it also.  One thing I like about cloverleaf is that there are many ways to get the job done  8)

      gary

    • #64061
      John Hamilton
      Participant

      Very much agree. Somtime just to many ways so people get confused on how to procede.

      Have a good weekend.

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

Forum Statistics

Registered Users
5,127
Forums
28
Topics
9,299
Replies
34,443
Topic Tags
288
Empty Topic Tags
10