Zum Hauptinhalt gehen

check for duplicates in form

Kommentare

5 Kommentare

  • John Nerge
    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
  • John Nerge
    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_hHHiqcTKMfSEE1bThFZkJ5TUk
    0
  • Permanently deleted user
    thank you John! this works great
    0
  • Permanently deleted user
    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
  • John Nerge
    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

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.