Temp variables in Xlate

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Temp variables in Xlate

  • Creator
    Topic
  • #48981
    Chris Williams
    Participant

      Does anyone have a cheat sheet they could post that explains the scope and syntax for temp variables in Xlates?

      Thanks.

    Viewing 0 reply threads
    • Author
      Replies
      • #60314
        Jim Kosloskey
        Participant

          Chris,

          Here is my understanding:

          There are intrinsic Xlate temp variables (temp variable provided by Quovadx). Most of those are self explanatory by their name. However, if you want to see what is actually in them, try COPYing them to text fields in an outbound message (maybe even create your own FRL to define the fields); and use the tester to see what you get.

          All temp variables start with @ and are followed by some name. I do not know of any limitations on the content or length of the temp variable name.

          I believe all temp variables are considered text no matter what you put in them.

          Temp variables can be use on either the Source or Destination side of an Xlate action.

          Something I do is to initialize all of my temp variables to be used in the Xlate at the beginning of the Xlate.

          There is an issue if a temp variable has never been set and you refer to it’s element of the list (I don’t recall the name of the list but it is the list of the three xlateIn.. lists provided which contains the name of the item in the Sorce list) vi a Tcl proc you will not get the element. So if you are relying on finding a specific temp variable in the name list so you can get it’s corresponding xlateInvals element (a technique I use to have non positional arguments for the xltp type procs I write) you will be improperly positioned.

          If the above is important to you, contact me and we can discuss.

          Anyway, I think it is a good technique to initialize and document the temp variable you intend to use within the Xalte at the very beginning.

          That is all I have,

          Jim Kosloskey

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

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