check for duplicates in form
I have a form with a text box field that I assign as a graphic attribute later to a feature. I would like my users to see if the number in that text box exists and an error come up e.g "this number is a duplicate". I cannot see that option in the validation section though, any ideas?
sql query?
0
-
If you're assigning the number to a record in an existing map layer, you could use Query Task to see if the number exists yet:
1) Get the user input
2) Use Query Task to select any existing records that have that number
3) Use an If statement or Flowchart decision to test if the feature set from the query tasks returned any records, syntax: yourFeatureSet.Features.Count()0 -
Here's a basic sample workflow using that Query Task method. It also includes a loopback so that if the number already exists it sends the user back to the form.
https://drive.google.com/open?id=0B_hHHiqcTKMfSEE1bThFZkJ5TUk0 -
thank you John! this works great 0 -
one question though, what would happen if you want to include more checks on the form for other fields? this solution is only for one field. 0 -
The simplest solution would be to used one Query Task + Flow Decision for each field. The important thing would be to provide the right messaging to the user so they know which field or fields have duplicate values.
Depending on your data, preventing the ability to give duplicate entries would be better but possibly more complicated.0
Please sign in to leave a comment.
Comments
5 comments