Select to view content in your preferred language

Ensure Employee IDs do not match

806
2
Jump to solution
11-12-2016 10:27 PM
OscarSepulveda_III
Frequent Contributor

I have a form that requires two employees to fill out. 

  • First Employee enters their City ID
    • pulldata calculation from .csv
      • prepopulates 'fullname' and 'classification' fields
  • Second Employee has the same workflow, EXCEPT the City ID CANNOT match the First Employee

How can I achieve this within Survey123?  This form is tracking items that require two paramedics signing off on daily.

0 Kudos
1 Solution

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

Hi Oscar. 

  • Do the paramedics fill out the same survey instance, say they work in the same shift and complete a single form together on one device, or do they complete their  own survey instance?
    • If completing the same survey instance, you could add a simple check like ${CityIDA}!=${CityIDB} in the constraint of the second CityID question.
    • If completing different survey instances, you  will not be able to ensure  uniqueness because it is  not possible at the moment to reference questions in separate forms, even if the forms are in the same device and populated by the same person.
  • Is the City_Id always the same for a given paramedic, or can a paramedic select City_ID A one day and the following select B?  That is, is there a 1:1 ratio between parademic and CityID
    • If you have a 1:1 ratio, you got lucky as you could use the 'username' type of question to calculate the City_ID as well as the 'fullname' and 'preclassification' using pulldata. I am afraid you have a 1:M ratio but just in case.  If the ratio is 1:M you will not be able to ensure uniqueness, or at least I cannot think of a way to do it.

View solution in original post

2 Replies
IsmaelChivite
Esri Notable Contributor

Hi Oscar. 

  • Do the paramedics fill out the same survey instance, say they work in the same shift and complete a single form together on one device, or do they complete their  own survey instance?
    • If completing the same survey instance, you could add a simple check like ${CityIDA}!=${CityIDB} in the constraint of the second CityID question.
    • If completing different survey instances, you  will not be able to ensure  uniqueness because it is  not possible at the moment to reference questions in separate forms, even if the forms are in the same device and populated by the same person.
  • Is the City_Id always the same for a given paramedic, or can a paramedic select City_ID A one day and the following select B?  That is, is there a 1:1 ratio between parademic and CityID
    • If you have a 1:1 ratio, you got lucky as you could use the 'username' type of question to calculate the City_ID as well as the 'fullname' and 'preclassification' using pulldata. I am afraid you have a 1:M ratio but just in case.  If the ratio is 1:M you will not be able to ensure uniqueness, or at least I cannot think of a way to do it.
OscarSepulveda_III
Frequent Contributor

Thank you Ismael.  I utilized ${CityIDA}!=${CityIDB} and changed the name of the lookup column and now it works perfectly.

0 Kudos