Select to view content in your preferred language

data validation

987
3
Jump to solution
09-19-2023 02:39 PM
Labels (1)
YenniferLinethCedeñoCampos
Emerging Contributor

¡Hello!

I am working on a form where data such as name and personal identity card (ID) are captured, I would like to know if there is a way that before sending a record it would be validated against the feature layer using the ID attribute if the record has already been sent, that is, it already exists in the layer. This is in order to avoid sending duplicate data.

Thank you

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

@YenniferLinethCedeñoCampos You could do this using the pulldata("@layer") function using survey123 Connect. Check out this blog: https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-pulldata-quot-laye... or this video: https://community.esri.com/t5/arcgis-survey123-videos/survey123-tricks-of-the-trade-live-query-arcgi... 

Essentially: 

  • Use a calculate question to query your feature layer using pulldata. Look for a record that already has the user ID
  • In your Identify Card question you can build an expression in the Constraint column to check if you got any value back in the calculate. If you get a value, you know it is a duplicate...

If your survey data includes sensitive data, be careful!  To do this type of check, you need to make sure the layer you are querying has query capabilities on. If that is the case, anyone with access to the layer will potentially be able to use the REST API to look at the records in your layer... If your survey is private, that reduces the risk but if your survey is public....  If you are familiar with using feature layer views you can reduce the data exposed (by querying a layer with JUST the userID column visible). 

 

View solution in original post

3 Replies
spence_amzn
Occasional Contributor

Are you using something like Survey123? 

0 Kudos
IsmaelChivite
Esri Notable Contributor

@YenniferLinethCedeñoCampos You could do this using the pulldata("@layer") function using survey123 Connect. Check out this blog: https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-pulldata-quot-laye... or this video: https://community.esri.com/t5/arcgis-survey123-videos/survey123-tricks-of-the-trade-live-query-arcgi... 

Essentially: 

  • Use a calculate question to query your feature layer using pulldata. Look for a record that already has the user ID
  • In your Identify Card question you can build an expression in the Constraint column to check if you got any value back in the calculate. If you get a value, you know it is a duplicate...

If your survey data includes sensitive data, be careful!  To do this type of check, you need to make sure the layer you are querying has query capabilities on. If that is the case, anyone with access to the layer will potentially be able to use the REST API to look at the records in your layer... If your survey is private, that reduces the risk but if your survey is public....  If you are familiar with using feature layer views you can reduce the data exposed (by querying a layer with JUST the userID column visible). 

 

YenniferLinethCedeñoCampos
Emerging Contributor

Excelente, Thanks so much

0 Kudos