concat inside an iterate

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf concat inside an iterate

  • Creator
    Topic
  • #51729
    gricelda lopez
    Participant

      The pharmacy dept. needs me to add a “#” at the and of the desciprion in AL1-3.2

      I have an iterate for the AL1 and a pathecopy plus a concat

      source:

      0(0).AL1(%g1).#3(0)

      =#

      destination: 0(0).AL1(%g1).#3(1)

      right now it looks like this with above xlt:

      AL1(0)  |1|DA|476^Penicillins~476^Penicillins^#

      AL1(1)  |2|FA|10433^Blue D&C No.2~10433^Blue D^C No.2^#

      AL1(2)  |3|FA|10827^D & C No.1 (Blue)~10827^D ^ C No.1 (Blue)^#

      goal is to get it like this .. without the ^  :

      AL1(0)  |1|DA|476^Penicillins~476^Penicillins#

      AL1(1)  |2|FA|10433^Blue D&C No.2~10433^Blue D^C No.2#

      AL1(2)  |3|FA|10827^D & C No.1 (Blue)~10827^D ^ C No.1 (Blue)#

    Viewing 2 reply threads
    • Author
      Replies
      • #71498
        Jim Kosloskey
        Participant

          Gricelda,

          Try using component notation in your CONCAT Action like this:

          source:

          0(0).AL1(%g1).#3(0)

          =#

          destination: 0(0).AL1(%g1).#3(1).[2]

          What you are trying to do is to add the # at the end of the 3rd component of AL1-3 but without component notation you are adding a new component.

          Hopefully that will work.

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

        • #71499
          gricelda lopez
          Participant

            thanks Jim.

            I pasted the wrong output on my initial post.

            What my goal is, i wnt the # concatednatd to the description

            AL1(0)  |1|DA|476^Penicillins#

            AL1(1)  |2|FA|10433^Blue D&C No.2#

            AL1(2)  |3|FA|10827^D & C No.1 (Blue)#

            the suggestion that you gave me

            gave me this result:

            AL1(0)  :  >|1|DA|476^Penicillins~^^476Penicillins#

            AL1(1)  :  >|2|FA|10433^Blue D&C No.2~^^10433Blue DC No.2#

            AL1(2)  :  >|3|FA|10827^D & C No.1 (Blue)~^^10827D  C No.1 (Blue)#

          • #71500
            Jim Kosloskey
            Participant

              Gricelda,

              OK your COPY examples whuch I took to be correct referenced the AL1-3 field as repeating – .#3(0) and .@3(1).

              If you do not have repeating AL1-3 field, then use this notation:

              source:

              ~0(0).AL1(%g1).#3(0).[2]

              =#

              destination: 0(0).AL1(%g1).#3(0).[2]

              Note you are using the Outbound field (AL1-3) component 3 here for the source (the ~ – tilde at the beginning tells you this) because the CONCAT follows the PATHCOPY thus the AL1-3.3 component is populated.

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

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