Coenievd
Novice

How to validate for existing entry

Jump to solution

I have a form with a smartbox SMO used in a claims process. How do I build in a validation in a text field to check whether the claim number you're trying to enter does not already exist in order to prevent duplicate from being captured in the db?

 

Thanks

Coenie

0 Kudos
Reply
3 Replies
AhmadAbdullah
Apprentice

Re: How to validate for existing entry

Jump to solution

Dear ,

 

I used one way to achieve that ... is by checking the database records before submitting the value.

u have something like when a button is clicked , then save the data into data base ... u will need to perform 1 rule before that which is checking the database records filtering them by the value u have in the textbox , and return the ID into a textbox .

in steps :

 

1-add "execute smartobject method (get list)" before ur saving rule 

2-filter the results from the method by the value in textbox compared to the column in data base .

3-if the record was found in database , in return properties , return the ID into a hidden datalabel in ur form.

4-after that u need to add an advanced condition (if the hidden data label isnot null) then "stop rules executions" and maybe show the user something to know that this record alraedy exist in data base ..

 

Hope it helps!

Regards.

Reply
Coenievd
Novice

Re: How to validate for existing entry

Jump to solution

It makes sense and I will try it out. Thanks so much.

0 Kudos
Reply
musman96
Novice

Re: How to validate for existing entry

Jump to solution
thanks man. that worked!
0 Kudos
Reply