AnsweredAssumed Answered

Validates values when entering records in a portal

Question asked by GisaelGomez on Aug 5, 2015
Latest reply on Aug 6, 2015 by philmodjunk


Validates values when entering records in a portal


Is it there an easy way to validate that the record we are creating in a portal has a unique value for that portal?

I mean, I can allow having the same value for a record is the portal is in two different parent records, but not in the same.

Let's say I have two tables called: Jobs and Welds. There is a Job called "A" and another called "B". I should be able to have a weld called "w1" in both Jobs ("A" and "B") but not two welds called "w1" in the same Job.

I already created a script (triggered when entering values ) that storage in variables the values for the weld and the job and go to the Weld layout and find those record that have the same value and if there is already a record with that value in the same Job I won't allow the user to create it. But I am wondering if there is a faster and easy way to do the same?. I feel that this script will turn slow the DB when having hundreds of thousands of records.

I will attach the screenshot for you to understand what I am talking about. I just want to create a better DB.

Thank you so much!