I need to validate two fields so as not to duplicate the record

I have a table for the daily report of the state of machinery; to avoid duplicating a record I need to validate the date and the machine code, I used this condition but it doesnโ€™t work for me, what am I doing wrong?

AND(COUNT(SELECT(Machinery daily report[ID RDM],[CODE]=[_THISROW].[CODE]))=0, COUNT(SELECT(Machinery daily report[ID RDM],[DATE]=[_THISROW].[DATE]))=0)

Solved Solved
0 2 101
1 ACCEPTED SOLUTION

Do only one COUNT( SELECT()), and use the AND() in the SELECTโ€™s condition.

Also, ISBLANK() is roughly equivalent to COUNT()=0, and is arguable easier to read and cleaner code.

View solution in original post

2 REPLIES 2

Do only one COUNT( SELECT()), and use the AND() in the SELECTโ€™s condition.

Also, ISBLANK() is roughly equivalent to COUNT()=0, and is arguable easier to read and cleaner code.

Thanks Marc

Top Labels in this Space