Iterate through the outbound variant

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Iterate through the outbound variant

  • Creator
    Topic
  • #50348
    Jorge Medina
    Participant

      Is it possible to iterate through the outbound variant? I am trying to iterate through the group then the segment.  Not sure if the basis is setup wrong or if this is even possible.

      Thanks, Jorge

      ITERATE:

      Type:  group

      Basis:  ~0(%g1)

      Variable:   %g1

        ITERATE:

        Type: segment

        Basis:   ~0(%g1).NTE(%s1)

        Variable:   %s1

    Viewing 5 reply threads
    • Author
      Replies
      • #65709
        Rentian Huang
        Participant

          I don’t see this is not possible, looks like your setup is correct too. Run the tester and you will find out.

        • #65710
          Jorge Medina
          Participant

            Rentian thank you for your prompt response. I have tested and the desired results are not acheived. Some detail as to what is the goal:  the inbound variant is the form:

            {

            [ OBX ]

            [{ NTE } ]

            }

            In the NTEs we receive messages stating “Testing performed at Mayo lab….”

            Of these messages, some contain an asterisk. The goal is to remove the NTEs which contain an asterisk. Then go back thru the outbound variant and if no NTEs contain “Mayo” add a message. If an NTE does contain “Mayo” no further action required. I have attached a screen shot of the translate for further details. Thank you in advance for your assistance. Jorge

          • #65711
            James Cobane
            Participant

              Jorge,

              I may be wrong, but I don’t think the engine will Iter through based on the outbound definition; I would verify this with Support.  I would think that you should be able to accomplish what you desire while itering through the inbound, as you are valuing the outbound based on your inbound; so if the inbound data meets the specific criteria, set some sort of indicator (a temp field) if it finds ‘Mayo’;  then you can check when the iter is complete to see if that temp field got valued, and if not, then you must not have found ‘Mayo’ in any of the NTE’s and you can perform the action to add the additional message.

              Jim Cobane

              Henry Ford Health

            • #65712
              Jorge Medina
              Participant

                Jim,

                We receive NTEs with the strings MAYO & *MAYO  The request is to remove NTEs with the string *MAYO  Then add a message if remaining NTEs do not contain the string MAYO  The plan was to copy @null to outbound if *MAYO is found then iterate thru outbound looking for string MAYO.

                If I iterate thru inbound looking for MAYO, the string will always be found regardless if it was nulled out on the outbound and no message will be added. However, I think I may have found a work around based on setting flags if an asterisk and MAYO are found in the same NTE.  It would still be good to know if you can or cannot iterate through the outbound.

                Thank you for your response, Jorge

              • #65713
                Jim Kosloskey
                Participant

                  Jorge,

                  You cannot iterate through the outbound, but you can skip (not null just not copy) any segment as you iterate through an inbound.

                  If you will be at the User Conference attend the Xlate BOF (not on the agenda, an informal gathering) Monday after the evening reception and I can show you how that is done.

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

                • #65714
                  Jorge Medina
                  Participant

                    Jim,

                    Thank you for your response. Not the answer for which I was looking , but now I can direct my efforts elsewhere to resolve this concern.

                    Thanks again,

                    Jorge

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