Hi. I have a Product_Master_File table with a column [Raw Code]. I need to enter an expression in the Valid_If constraint to prevent the user submitting a Raw Code that already exists. I need to use another column in the table as the key field so I canโt set the [Raw Code] column as the key field.
Any help on this would be great.
Thank you.
Solved! Go to Solution.
Try:
ISBLANK(
FILTER(
"Product_Master_File",
AND(
([_THISROW].[Raw Code] = [Raw Code]),
([_THISROW].[RowKey] <> [RowKey])
)
)
)
Replacing RowKey
with the name of the key column of the Product_Master_File table.
Try:
ISBLANK(
FILTER(
"Product_Master_File",
AND(
([_THISROW].[Raw Code] = [Raw Code]),
([_THISROW].[RowKey] <> [RowKey])
)
)
)
Replacing RowKey
with the name of the key column of the Product_Master_File table.
Worked perfectly @Steve, thanks a million.
Hello Steve,
I tried this expression and it works, I added the โInvalid value errorโ with an error/duplicate message.
The problem is that when would like to edit the row it gives the message that the record already exits. So I am no able to edit the form with your mentioned expressionโฆ How can I solve this?
Please provide a screenshot of the complete Valid If expression.
Add this condition inside your AND() expression:
([_ROWNUMBER] <> [_THISROW].[_ROWNUMBER])
You existing expression answers the question, โdoes this particular combination of values occur anywhere in the table?โ Adding the condition above changes the question to, โdoes this particular combination of values occur anywhere else in the table?โ
User | Count |
---|---|
33 | |
29 | |
29 | |
20 | |
18 |