In the view shown below, SO# is the PK (not auto generated). In the image, I have attempted to add a new record with the same PK (10724) as another record, understanding that it should throw an error, which it did.
Question 1: Is there a way I can change the text? I would like it to say, for this view) โThere is already a project with SO โ10724โ. Please enter a unique SOโ or somethng along those lines.
Question 2: Is there a way that I can trigger/offer a secondary action when this happens? Example, since there is an existing record, I would like to offer the option to jump to the details view for that record.
Solved! Go to Solution.
Try:
ISBLANK( SELECT( MyTable[_ROWNUMBER], ([_THISROW].[SO #] = [SO #]) ) - LIST([_ROWNUMBER]) )
This finds all rows in the MyTable table that have the same SO # column value as this row and produces a list of their row numbers. This rowโs row number is then removed from that list, leaving only the row numbers of other rows with the same SO # column value. If that list of other rows is empty (blank), this row is the only one with that value.
User | Count |
---|---|
42 | |
30 | |
25 | |
23 | |
13 |