Forum Discussion

JimHarrison's avatar
JimHarrison
Qrew Champion
5 months ago

Custom Data Rules testing for Unique

I am looking for how to write a custom data rule to handle a Unique field. There doesn't seem to be any documentation or I have not found it yet. If you know the syntax for handling a unique field in a custom data rule please let me know.



------------------------------
Jim Harrison
transparency = knowledge + understanding : The Scrum Dudes
------------------------------

5 Replies

  • What do you mean specifically? Are you trying to evaluate uniqueness through a combo of values in a custom data rule - why custom data rules versus the uniqueness setting of a field?



    ------------------------------
    Chayce Duncan
    ------------------------------
    • JimHarrison's avatar
      JimHarrison
      Qrew Champion

      We are seeing Webhook errors when users import records with non-unique values. I need to alert Users they are attempting to import duplicates on a field that is marked unique in the table. I want to write a custom data rule that throws an error when the User imports a non-unique value.



      ------------------------------
      Jim Harrison
      transparency = knowledge + understanding : The Scrum Dudes
      ------------------------------
      • ChayceDuncan's avatar
        ChayceDuncan
        Qrew Captain

        Is the unique field the key of the table or just a entry field? 

        One option if it's not the key field is to use a formula query and count the # of records that have the same value and if it's greater than or equal to 1 then you know it's not unique since it's finding records in the table with the same value. 

        Is there a reason that the native unique field setting to make sure values are unique wouldn't work? You would still get a message that pops up during import that there are duplicate values



        ------------------------------
        Chayce Duncan
        ------------------------------