Iterate Issue

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Iterate Issue

  • Creator
    Topic
  • #53642
    Jon Melin
    Participant

      Hello,

      I am having an issue with an iterate not copying correctly. I believe I have the variant set up correctly. I have a group that repeats and within the group there is a field that repeats. I first look to make sure I am within the correct group repeat by checking for a specific word at the beginning of the group, once I am in there I am looking for a specific authority within that group (that is the repeating field). It seems to only get through the first group iterate, and says the second one is blank (which it isn’t). I have a screenshot of all of my configurations and a print of one section of the repeats and my echos. I have been looking at this for a long time and would like some suggestions please.

      Thank you,

      Jon

    Viewing 7 reply threads
    • Author
      Replies
      • #78407
        Jim Kosloskey
        Participant

          Jon,

          Have you run the Test data through the HL/7 tester for your inbound variant to validate the data matchesd the variant – or vice-versa?

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #78408
          Terry Kellum
          Participant

            Should your field iterate be nested in the group iterate?

          • #78409
            Henry Tabingo
            Participant

              Jon,

              I don’t know if you have already resolved your xlate iterate issue. If not, it appears your variant has a repeating ZDS segment and I don’t see a ZDS segment iterate. You may have to do that first before iterating the ZDS field.

              My 2 cents.:)

            • #78410
              Jon Melin
              Participant

                Thanks everyone. I did get it to work by changing the variant around but I don’t understand why I needed to iterate on the ZDS segment when the IB message just seemed to iterate on the field number and the 3rd group. Why is that?

                Thank you

              • #78411
                Henry Tabingo
                Participant

                  Jon,

                  You don’t need to iterate on all ZDS segments if you only need to process the first ZDS segment, as you are doing now.

                  Thanks.

                • #78412
                  Jon Melin
                  Participant

                    I do need to search through all the ZDS segments but they appear in the inbound to be repeating as groups not ZDS segments. Essentially there are many different groups coming in and I need to find certain ZDS#1 keywords and copy that repeating field (#2) within that group. So I do need several of the groups that have the same ZDS segments in each group.

                    Thank you,

                    Jon

                  • #78413
                    Henry Tabingo
                    Participant

                      {

                       [{OBX}]

                       [{NTE}]

                       [{ZDS}]

                      }

                      I don’t know how you changed your variant to make your translate work, but your original variant above shows your group with all segments [{OBX}], [{NTE}], and [{ZDS}] optional and repeating. All I’m saying is that you can have several ZDS segments within the group. And that’s what I’m suggesting that you iterate through if you need to process all the fields in each repeating ZDS segment in a group. If your message has only one ZDS segment in each group, your code works fine. I could be making wrong assumptions on your variant and message after you have made changes.

                    • #78414
                      Jon Melin
                      Participant

                        I see what you mean. I don’t think I should have had repeating segments in the variant then. It was group and fields that repeated.

                        Maybe that was my issue.

                        Thank you,

                        Jon

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