A question about validation - two fields

I am working on a project that i seem stumped on the validation part of field entry. How can I prevent a duplicate entry based on two fields. Example…I enter a load number from load sheets. That load number can be a duplicate but only if the mill it is going to is different. So Load 51234 can come from Mill A, but Mill B can also have a load 51234 because they are different load slips. So when I record 51234 from Mill A, as long as both fields don’t match, I can create the record. If they do, then throw an error as it is now a duplicate. Make sense?

Yeah I think you’ve got the basics already figured out:

Have the first workflow run only when the load # and Mill match. "do a search for Load # : count > 0 AND Do search for Mill where Load # is THIS MILL" (If they match throw an error)

If the mill and Load# are not the same then you can make a new Record.

1 Like

that is kind of what i thought. I am new so, wasn’t sure about AND in the search. I will try that and report back.

Thanks for the quick reply

1 Like

Hi there, @tbcguytb… there are a number of ways to do what you have described, and here is an example that has data types for Load and Mill, with the Load data type having a field that is tied to the Mill data type.

In this example, you are allowing a new load to be created only when the count of a search for a load with the same number and mill is 0.

Hope this helps.


Edit: I see that @jobs replied as I was typing, and our responses are pretty similar… so, there you go. :slight_smile:

1 Like

Worked like a charm. Thanks everyone.


1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.