In this tutorial, you will create a dependent dropdown list that allows users to select a work hub and select how many days that they want to work at the work hub.
You will create two custom objects:
- The Cities custom object for the user to select the city that is nearest to them.
- The Work Hubs custom object to allow users to select the work hub that they want to work in depending on the city that they selected.
You will also create a dropdown list so that users can select the number of days that they want to work at the work hub.
Contents
Creating the Cities custom object
- Click Configuration >Data Model > Objects.
- Click Create new object.
- Type Cities as the name of the object.
- Type a description.
- Click Save.
Adding records to the Cities custom object
- Refresh the screen.
- Search for the Cities object.
- Click the 0 (zero) in the Total Records field.
- Click Add record.
- Enter the name of the city.
- Click Save & New.
- Create the rest of the city records.
Creating the Work Hubs custom object
- Click Configuration >Data Model > Objects.
- Click Create new object.
- Type Work Hubs as the name of the object.
- Type a description.
- Click Save.
Adding the Cities custom object as a field to the Work Hubs custom object
To set up the relationship between the Cities and Work Hubs custom objects, you add the Cities custom object as a field to the Work Hubs custom object.
- Click Data Model > Field Configuration.
- Select Work Hubs from the Objects list.
- Click Add field.
- Type City as the name of the field.
- As a data type, select Cities.
- Click Create.
Adding records to Work Hubs object
- On the Objects page, search for the Work Hubs object.
- Click the 0 (zero) in the Total Records field.
- Click Add record.
- Enter the name of the work hub.
- Select a city.
- Click Save & New.
- Create the rest of the Work Hubs records.
Result
You have successfully added the custom objects that you want to use to create a dependency dropdown list in a survey.
Next
Creating the survey
- Click Configuration > Workflows.
- Open a users workflow that you created or create a new users workflow.
- Click Add Survey .
- Type the name and the description of the survey.
- Type Submit as the name of the label.
- Click Save.
Adding the survey variables
To add the objects as fields to surveys, you must create survey variables.
Creating the variable for the City custom object
- Click Variables and then click Add Variable.
- Type City as the variable name.
- Select City from the Type list.
- Click Submit.
Creating the variable for the Work Hubs custom object
- Click Add Variable.
- Type Work Hub as the variable name.
- Select Work Hubs from the Type list.
- As Display option, select Dependent.
- As Parent variable, select City.
- Ensure that City is selected as the Work Hubs field.
- Click Submit.
Adding the variable to create the dropdown for selecting the number of days
- Click Add Variable.
- Type the variable name such as Number of days.
- Ensure that Short text is selected as the Type.
- Select Dropdown as the display option.
- Type each option, such as One day a week, Two days a week, and so on, on a separate line.
- Click Submit.
Adding the variables as fields to the survey
- Click Surveys .
- Expand the survey.
- Click Add survey field.
- Select the City variable.
- Select a field attribute. In this scenario, select Default.
- Type an alternative field label.
- Type a description.
- Click Save.
- Click Add survey field and repeat the procedure to add the Work Hub variable and the Number of days variable as survey fields.
Result
Click the Survey actions menu , and select Preview.
You have successfully created a dependent dropdown list and a dropdown list so that users can choose the work hub nearest to where they live, and they can select how many days per week they want to work at the work hub.
Next
To learn more about creating surveys and using surveys to get feedback from users, see Creating and managing request offerings.
Comments
0 comments
Please sign in to leave a comment.