Xlt Procs

  • Creator
    Topic
  • #53988
    David Harrison
    Participant

      Cloverleaf 6.0 on REL

      I want to run two tcl procs pre-Xlate. I put the second one in the line below the first but when I run the Xlate throught the test tool it only executes the second proc.

      Any ideas welcome

    Viewing 6 reply threads
    • Author
      Replies
      • #79775
        James Cobane
        Participant

          David,

          When you state you want to run two procs pre-xlate, are you referring to pre-xlate on the route, or are you referring to in the pre- context within the Xlate?

          Jim Cobane

          Henry Ford Health

        • #79776
          David Harrison
          Participant

            Jim,

            It’s the Pre Proc within the Xlate.

            Thanks,

            Dave

          • #79777
            James Cobane
            Participant

              Okay.  So, the procs are both going to be using the same values for xlateInVals, and if they are both setting xlateOutVals, the net effect will be only the output of the 2nd proc.  If you want the 2nd proc to use the xlateOutVals values produced from the first proc, you will need to code it that way.  Does that make sense?

              Hope this helps.

              Jim Cobane

              Henry Ford Health

            • #79778
              David Harrison
              Participant

                Jim,

                Yes I get the idea. It’s probably easier to combine the two procs into one.

                Thanks,

                Dave

              • #79779
                Jim Kosloskey
                Participant

                  Or…

                  You could use two Xlate Actions.

                  The first uses the first proc and places the result in a destination of either a temp variable or an output field.

                  The second Action uses the second proc and the temp variable or output field populated by the first Action placing the result where you want it.

                  This way you keep the Tcl code discreet in its usage.

                  I do this all the time – The Xlate then and not the proc becomes the view of what is happening.

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

                • #79780
                  James Cobane
                  Participant

                    What Jim suggests is something that I do all the time as well.  It keeps the procs modularized and provides easy step-through of the actions in the Xlate.

                    Jim Cobane

                    Henry Ford Health

                  • #79781
                    David Harrison
                    Participant

                      Ok. Thanks for the tip

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