Role of Enums

Overview

An Enum or enumeration is a complete list of all the items in a collection. It is used to list options in the form of checkboxes, drop-downs, or radio buttons. So if a given value has a set of options, you use Enums to represent that in the flat file.

Enums could be added only to a flat file. If you have a generic file, upload the model and then add the Enums to the flat file that gets downloaded to your device.


Step-by-Step Guide


  1. While developing a Prototype, there may be instances when you need to provide options to the customers. In such a scenario, you need to add Enums.


  1. Add a new sheet to the flat file immediately after VROI-INPUTS and VROI_OUTPUTS and name it VROI_ENUMS.


  1. Enter the name of the Enum in the Name column.


  2. Provide more details about the Enum in the Description column or leave it blank.


  3. Enter the options in the Elements column.


  4. Provide the numerical values that you assign to each element of Enum in the Values column. Refer to the Enum Model to clearly understand Enums.


  5. To make the options available to the customer, the particular Enum should be pulled in the VROI_INPUTS sheet. The options would be displayed either as a checkbox or drop-down on the Prototype page.

Note:


  1. Usually, for two options a checkbox or radio button is used while for more than two options, a drop-down list is used.


  2. To display Enum as a checkbox, ensure to add the format for the checkbox wherever Enum is referred to in the VROI_INPUTS sheet of the flattened file.


  3. In the case of Generic files, if there is a checkbox/dropdown in the model, replace it with constant values and then upload. Later in the downloaded flattened file, create the VROI_ENUMS sheet, add Enums, and then pull the Enum values to the same variable to which we hardcoded the constant values during Generic upload.


  4. Include,1##Exclude,0 - Include/Exclude would appear as a dropdown option in the UI. Its value 1, 0 would be returned to VROI_INPUTS from VROI ENUMS, which is then used for VROI_OUTPUTS calculations in the flattened file.

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