Create a Select All Enum Option

Overview

Sometimes a model might have a lot of (include/exclude) values and therefore including a Select All Enum as an option helps improve user experience.


Step-by-Step Guide

  1. Enter the Enum code in the VROI_ENUMS sheet of the Excel file.


  1. Call the Enum value in the Value field.


  1. Create the VROI_INPUTS sheet in the Excel model with Enum as Variable Type and Checkbox as Format. Here the variable Infrastructure is the Parent input while the rest are the Child inputs.


  2. Follow the steps to Add a Simple Table in Value Collaborator.



  1. Click Prototype and you can see that all the variables appear unchecked.


  2. Follow the steps to Edit Group Variable.


  3. Copy the following code:
"conditional variables": [
{
"type": "parent-child",
"parent": "Infrastructure IN2",
"childerns": [
"Roads IN3",
"Railways IN4",
"Bridges IN5",
"Tunnels IN6",
"Water Supply IN7"
]
}
],
  1. Paste it in the Group Variable right after the curly bracket. Here the value of the Parent checkbox (i.e. Infrastructure) would check or uncheck all the child checkboxes.

  1. Click Value Collaborator on the Visualizer Type page.

  1. Click Save on the top navigation and then click Prototype.



  1. You can see that on selecting the Infrastructure checkbox rest of the variables also get selected automatically and vice versa.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us