Skip to main content
kristinf8610
October 17, 2023
Question

Is it possible to check to see if something is a percentage match?

  • October 17, 2023
  • 3 replies
  • 0 views

Hi there,

I have a desired requirement from a client about checking to see if two values are an 85% match. So for example, if a user entered ABC, Inc. for one value and ABC, Co. for another, it would be flagged. This is just one example, if the similarity of names was in the middle or end of the value, it would also be flagged. I just can't seem to wrap my head around any logic to make this possible. Any suggestions? Thanks!

    3 replies

    stefanhelzle0001
    Brainy
    October 17, 2023

    Try your luck with soundex().

    a!localVariables(
      local!name1: "ABC, Inc.",
      local!name2: "ABC, Co.",
      {
        soundex(local!name1),
        soundex(local!name2)
      }
    )

    Returns: 

    {"A125", "A122"}

    Compare the first letter, and then the numbers and check whether they are within a certain range.

    But I am not sure whether that works for all the cases you have in mind.

    kristinf8610
    October 17, 2023

    Interesting, I have never worked with this function! I will check it out, thanks!