For a given project, there are many unique tickets. I have valid_if logic to enforce unique a unique [ticket_no], with a helpful error message:
Previously, I was using uniqueid() as a pkey column ([id]) for each ticket. To facilitate better sqlserver indexing / organization, I want to use a compound/computed key based upon [project_id] and [ticket_no].
When I do this, having a duplicate [ticket_no] will also violate the uniqueness requirement of the rows primary key. This is fine - however, the error message generated from this overrides the more helpful error message applied to the [ticket_no] column. With the computed column, no error message will display under [ticket_no] at all. Upon trying to save, the default (and less user-friendly) “There is already a row with the key ____” message is displayed at the top of the form:
Note that error messages for other columns will still display. This leads me to believe that what I want to do is possible; however, I will need to adjust my formula. What I would typically use in this scenario is:
NOT(IN([_THIS], SELECT(tickets[ticket_no], NOT(IN([id], LIST([_THISROW].[id]))))))
The above formula won’t work, as the [id] column changes dynamically to reflect the ticket_no.

