How do I require an entire form to be unique without requiring individual fields to be unique so that if field A response already exists then field B must be different?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I want to be able to have multiple records for each client but not allow duplicates of the same product selection for that client without having a separate application for each product. So, if a client wants 3 different products then there can be 3 different entries, but if the application participant tries to add the same client ID / Product combo then the application would reject the entry.

Ex:

Entry 1 - ID#1002 & Pie              (Good)

Entry 2 - ID#1002 & Chocolate   (Good)

Entry 3 - ID#1002 & Pie              (Rejected)


Note: Product selection is a dropdown list, so requiring a unique value in either field alone will not achieve the desired result.

Photo of Chosen

Chosen

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,944 Points 50k badge 2x thumb
If the choices for the product selections are just based on a Multiple choice field with built in choices, then you would make a formula with the name 

[Same Client - Same product]

 and the formula would be 

List("-", [Related Client],[Product])

and set it to be Unique in the field properties.


if the Product choices are from a Relationship, then the formula would be similar with 

List("-", [Related Client],[Related Product])
Photo of Chosen

Chosen

  • 0 Points
Excellent. Thank You, Sir.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,944 Points 50k badge 2x thumb
When you try entering a duplicate, you will see the reasoning for the choice of the field name.  It gets baked into the error message which the users sees.
Photo of Chosen

Chosen

  • 0 Points
Nice. That's even better. This will help substantially. Thank you again.