LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Value translation by fuzzy matching 2 tables

    Employee
    Posted 09-21-2013 07:14

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ronald

    Hi,

    I'm trying to translate phone numbers (table 1) into country's (table 2) by strFindI command. (fuzzy matching)
    This because the phonenrs in tab1 are not completely matching the numerparts in tab2.

    When a part of phonenr in tab2 is in the nr in tab1 then the number needs to be translated in a county.
    When they not match the nr in tab1 will not be translated and kept the same.

    Examplecode is attached with sampledata, requested outcome and some unsuccesfull attempts.

    Any help would be very welcome !

    kr Ronald
    Attachments:
    Fieldtranslations.brg


  • 2.  RE: Value translation by fuzzy matching 2 tables

    Employee
    Posted 09-24-2013 05:06

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tim Meagher

    Hi,

    Originally I was thinking that the Fuzzy Matching nodes provided with LAL would do what you want here, but I guess you're looking for exact substring matching - rather than fuzzy matching based on some algorithm and threshold.
    In which case, I have attached a solution....
    It's not pretty, and probably will operate quite slowly.
    It also assumes that the number of records in the lookup (i.e. the number of country codes) will always be relatively small.
    Maybe someone else can provide a better way to do this, however this was about the best I could come up with quickly.

    Regards,
    Tim.
    Attachments:
    Fieldtranslations_wip.brg


  • 3.  RE: Value translation by fuzzy matching 2 tables

    Employee
    Posted 09-25-2013 02:29

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ronald

    Hi Tim,

    Thanks! This was really a puzzle and you brought the only working solution!
    To speed things up it seems to work also without element 'lookup_3'.

    Excellent help!
    kr
    Ronald