Forum Discussion

AngelRodriguez's avatar
AngelRodriguez
Qrew Assistant Captain
5 years ago

Limit child record status with a checkbox

I currently have two tables in my app, 'Vendors' (parent) and 'Vendor Contacts' (child) - one Vendor to many Vendor Contacts.

In my Vendor Contacts table, I added a checkbox named 'Primary Contact'. I'm trying to limit Vendors to allow only one Vendor Contact with the 'Primary Contact' status. I created a reverse relationship as well, where Vendor Contacts is the parent to Vendors, with Primary Contact as a lookup field in the Vendors table.

At this point, I'm not certain what to do to next to make sure that Vendors only has one Primary Contact checked off where I can hide the checkbox if Primary Contact is already selected in any of the Vendor Contacts related to one Vendor.


------------------------------
AR
------------------------------
No RepliesBe the first to reply