List basis

  • Creator
    Topic
  • #54008
    Mike Keys
    Participant

    Can someone tell me how this works exactly?

    I’ve written out a list of elements to a variable @counter. The list looks something like this {1 2 3 4 5 6 7…etc}

    What I want to do us use this counter as a basis for an interate and then use the variable %l1 to populate an outbound group of XML lines that contain picklist information for an application we are going to use.

    The %l1 variable would indicate which line to write to. So, if the iterate was looking at element ‘2’, then I would be copying data for the second group of picklist lines. Since we can’t iterate on an outbound (WHY????), I’m trying to wrap my head around on how to do this.

    Oh, and I’m going from an HL7 SIU message type to XML, just to keep things interesting. The picklist info is coming from a Tcl proc that grabs data from a database and populates some arrays containing the picklist items info (item_nbr, desc, qty), which is then returned to the XLATE.

    The problem is that if I just do straight copies from these variable, (passed through a pre proc in the copy statement to grab the corresponding array elements for that rep), only the LAST group of data gets copied out. So, I really need some type if iterate.

    We’re using 5.7 Rev2, so I can’t do XLATE chaining. I’m wondering if I should just be looking at writing a separate post proc procedure to fill those lines.

Viewing 0 reply threads
  • Author
    Replies
    • #79863
      Robert Kersemakers
      Participant

      Hi Mike,

      Have a look at this post: http://clovertech.infor.com/viewtopic.php?t=2213

      It explains how to do a ‘do-while’ in an XLATE. In your case, you wouldn’t need the list {1 2 3 4 5 6 7}, but only the number of iterations you need (here: 7).

      Just ask if you have questions.

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

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

Forum Statistics

Registered Users
5,074
Forums
28
Topics
9,252
Replies
34,241
Topic Tags
275