--- alias: user-guide-automation-business-scenarios-building-structure-step-question tags: - automation - connect iot description: "This documentation outlines a component for displaying user input with required fields and customizable options" --- # Question Display a message to inform the user that some information is required, allowing him to provide an answer. | Name | Description | Mandatory | Type | Possible Values | Default Value | | ------------ | ------------------------------------------------------------- | --------- | -------- | ------------------------------------------------------------------------------------------------- | ------------- | | message | Message to show to the user | Y | `String` | | | | dataType | Value type expected for the user to answer with | Y | `Enum` | `String`
`Integer`
`Long`
`Decimal`
`Boolean`
`DateTime`
`Object`
`Password` | `String` | | defaultValue | Default value to provide to the user | N | `any` | | | | settings | Sub settings to customize the input box displayed to the user | N | `Object` | | `{}` | ## DataType specific settings | DataType | Property | Description | Mandatory | Type | Possible Values | Default Value | | ------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------- | ---------------------- | --------------- | ------------- | | `EntityType` | data | Script to execute to return the array of Entity types to display
Note: Either this or `query` must be provided | N | `Script` | | | | | query | Script that will return a `QueryObject`.
Note: Either this or `data` must be provided | N | `Script` | | | | | displayField | Property of the object to show in the selector (in the GUI it will use the `dataComparisonField` property) | N | `String` | | `"Name"` | | `Enum` | enumValues | Values to show. Either a list of string where each string is an option or an object, where the key is the text to show and the value if the value of the selection | N | `String[]`
`Object` | | | | | data | Script that must return an array of objects that will be used by the gui and must respect have the properties `Id` and `Name` | N | `Script` | | | ## Example snippets ```json { "name": "Example Question", "type": "Question", "settings:": { "message": "What is your name?", "dataType": "String" }, "next": "End", "resultKey": "name" } ``` ```json { "name": "Example Question Integer Min Max", "type": "Question", "settings:": { "message": "What is your age", "dataType": "Integer", "defaultValue": 20, "settings": { "min": 0, "max": 120 } }, "next": "End", "resultKey": "age" } ``` ```json { "name": "Example Question Enum", "type": "Question", "resultKey": "selectionMode", "settings": { "message": "Do you wish to have a manual selection with ',' separated Manager Names or the interactive mode?", "dataType": "Enum", "settings": { "enumValues": [ "Manual", "Interactive" ] }, "defaultValue": "Interactive" }, "next": "End" } ``` ```json { "name": "Example Question EntityType", "type": "Question", "message": "Select and entity type", "settings": { "dataType": "EntityType", "settings": { "data": "", "displayField": "Description" } } } ``` ```json { "name": "Example Question Find Entity", "type": "Question", "resultKey": "currentSelectedManager", "settings": { "message": "Please select an Automation Manager to Deploy:", "dataType": "FindEntity", "settings": { "query": "" } }, "next": "PushManager" }, ```