Unique Collector Number

Since Specify 7.9.3, the Schema Config allows configuration of Uniqueness rules. Documentation on Configuring Uniqueness Rules explains:

  • how to establish uniqueness rules on a per table basis.
  • for one or more fields
  • within a given scope (database by default)

I’ve been thinking whether the feature could be adapted to ensure unique collector number for a given collector (the primary collector when collector is a group), within the scope of the collection.

It does not seem achievable as it is? It would be some kind of uniqueness rule across tables, in my case between:

  • stationFieldNumber from collectingEvent table
  • GUID from agent table where collector::isPrimary=TRUE

Any hint?

1 Like

Hi,

Thank you for reaching out, we’re so glad you’re exploring the uniqueness rule configuration tool in Sp7!

From my understanding, you’d like to set a particular Agent to be primary by default when added as as a Collector. Unfortunately, this functionality would be outside of the uniqueness rule configuration tool framework. As you’ve observed, you cannot configure uniqueness rules that reference fields from the agent table when working within the context of the collectingEvent table.

Given these limitations, you might need to implement a manual validation step during data entry to ensure that the collector numbers remain unique.

If this feature is crucial for your workflow, I encourage you to submit a New Feature Request!