Lookup table

  • Creator
    Topic
  • #48042
    Mark Perschbacher
    Participant

    Is there a way to build a lookup table, or maybe build a COPY command within an xlate, such that if Cloverleaf doesn’t find a match within the table, it will send across a constant?

Viewing 7 reply threads
  • Author
    Replies
    • #57432
      Elizabeth Wilson
      Participant

      How about defining the constant as the DEFAULT in the table

    • #57433
      garry r fisher
      Participant

      Hi,

      I use lookup tables this way regularly. I define my default to some thing like NONE, pass the result of the lookup into a temporary value and then check this using an IF statement. I then COPY the relevant value based upon the result of the IF.

      Hope this helps.

      Garry

    • #57434
      Mark Perschbacher
      Participant

      The default value worked fine.  Another lookup table question, have either of you tried entering a lookup value with a wild card.  In other words, REGENCE@, would catch REGENCE PPO, REGENCE PRIMARY CARE,etc?

    • #57435
      Jim Kosloskey
      Participant

      Mark,

      To my knowledge the Table Lookup does not support wild cards.

      Jim Kosloskey

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

    • #57436
      garry r fisher
      Participant

      Hi,

      I’m not aware of a wild card option in lookup tables. It would be nice.

      Garry

    • #57437
      Steve Carter
      Participant

      Here’s a thought on the wildcard table lookup…

      If you can load the table on the fly and convert it into 2 lists, 1 for input and 2nd for output.  You could then search either side of the list using a wildcard and then reference the matching element in the other list.

      I’ve done the first part, but haven’t had any need for a wildcard lookup in a table.

      Steve Carter

    • #57438
      Mark Perschbacher
      Participant

      Steve, interesting idea.  Could you provide a skeleton proc on how you are proposing to do this.  I am a Cloverleaf newbie, so please bear with.  How would you insert this into the xlate?  The data I am pointing at the table is coming from a VRL file, and I thought about running it through a proc before it hits the table with some IF statements that would take similar inputs, and send out a standard output.  This table is for insurance company names, and there are lots of similar, but slightly different names.

    • #57439
      Steve Carter
      Participant

      No skeleton, but it’s fairly straight forward:

      1.

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

Forum Statistics

Registered Users
5,127
Forums
28
Topics
9,299
Replies
34,443
Topic Tags
288
Empty Topic Tags
10