Summary
In ArcGIS Survey123 Connect, the questions can be assigned, or restricted based on user roles or usernames. This article provides the workflow to allow only certain user roles or specific usernames to respond to the questions.
Procedure
- Add a question and define the username to respond to the survey.
- In ArcGIS Survey123 Connect, click XLSForm to open the XLSForm file of the survey.
- In the survey worksheet, in the type column, click an empty cell, and select username from the drop-down list.
- In the calculation column, enter the following pulldata() function:
pulldata("@property",'username')
- Create a CSV file with a list of usernames and user roles.
- Create a Microsoft Excel file with the list of usernames and designated roles, as shown in the image below.
- Save the file as a CSV file. Refer to Microsoft Support: Save a workbook to text format (.txt or .csv) for instructions.
- Import the CSV file to the survey's media.
- In ArcGIS Survey123 Connect, click Files to open the survey files' folder.
- Copy the CSV file into the media folder. In this example, the CSV file is Usertypes.
- Reference the CSV file in the XLSForm file.
- In the survey worksheet of the XLSForm file, in the type column, click an empty cell, and select calculate from the drop-down menu.
- In the calculation column, enter the following pulldata() function:
pulldata('<CSV file name>','<the name of the user role column>','<the name of the username column>', ${<question>})
- Assign the questions based on the user role or username.
- To make the question visible to a specific user role, in the relevant column, enter the following selected() function:
selected(${<the CSV question name>},'<user role>')
- To make the question visible to a specific username. In the relevant column, enter the following formula:
${<Name>}='<username>'
Note:
Multiple values can be used in the relevant column. These values must be separated by 'or'. For example, selected(${<the CSV question name>},'user') or selected(${<the CSV question name>},'Data Editor').
- Click Save.
- In ArcGIS Survey123 Connect, click Publish to publish the survey.