0

Trigger YES/NO formula if value already present in DB

Hello,

my records contain telephone numbers of clients and i would like to know if the phone i enter has alredy been used in the past. This to understand recurring clients. Since i cant set conditional styling to phone numbers i was thinking of setting a separte YES/NO formula to trigger if the entered number was already present in the DB. Any suggestions on how do do this?

Thanks! 

4 replies

null
    • Alain_Fontaine
    • 3 yrs ago
    • Reported - view

    Let“s that your table is named ”myTable“, and that the field containing the phone number is named, well, ”Phone“. A formula to detect if the same number exists would be something like:

    let zPhone := Phone;

    cnt(select myTable [Phone = zPhone]) > 1

    • CLD
    • Valerio
    • 3 yrs ago
    • Reported - view

    Alain thanks as usual! Works great! What if I want to count how many time this “phone” is detected?

    • Alain_Fontaine
    • 3 yrs ago
    • Reported - view

    Just remove “ > 1”.

    • CLD
    • Valerio
    • 3 yrs ago
    • Reported - view

    :) thanks!

Content aside

  • 3 yrs agoLast active
  • 4Replies
  • 601Views