Options settings are used in Vizlib Writeback Tablewhen you have a data type that supports choosing an answer from a selection of possible values.
You'll see Options appear when you select the Dropdown, Icon, Flag, Radiobutton and Multiple Choice data types in the Data panel. Dropdown, Icon and Flag currently support a maximum of 10 000 rows.
Note: When you click a column in the writeback table in edit mode, you'll open the column properties in the property panel.
TABLE OF CONTENTS
The Define Options slider lets you choose how you add or edit data. Figures 1 and 2 show a dropdown data type.
Define Options allows you to add, edit or delete functions.
- Type on Label to enter a Label name
- Enter a Value expression by opening the Qlik Sense editor.
- Select the Default value checkbox if required.
- Use the arrow above the Label box to show or hide each option field.
- Click on Add Option to save the field properties and need to add another (see Figure 3).
Figure 1: Define Options
If you select the Use Field setting, you'll use the Options Field to define the data type properties. The Options Qlik Sense expressions, which can be added by clicking the button and opening the Qlik Sense editor to define the field properties. (Figure 2).
Figure 2: Options Field
The dropdown data type lets you build or import a list of values, with the user selecting one. The selected value is then displayed in the table.
- Select Allow Null if you want to include a null option.
- Select the dropdown value type (String or Numeric).
- Use the Default value expression editor to add a default value if you need one.
- Select the Options type you'd like to use.
- Add or edit your dropdown values.
Once you've added your dropdown options, they'll be displayed in the table view, The example we've used in Figure 3 shows a dropdown with 3 values (US, GB and DE).
Figure 3: Dropdown
The icon data type is displayed in a dropdown list, with a symbol beside each option. One option can be selected at any time, and null values are allowed.
- Select the Label, Value and Default value.
- Select an icon Color, and then click on the Global Icon button to display the list of shapes. Shapes and colors can be defined for each separate field.
You can see an example in Figure 4, with the Adequate Service list option from the Service Level column displaying a different icon shape.
Figure 4: Icon
To add icon option properties with the Options field (Figure 5), click on the button in Options Field to open the editor.
You can also select a Fallback Icon (a default Icon for any options in the column) by adding an expression using the editor, or clicking on the button under the Fallback Icon field.
Figure 5: Icon Options Field
The flag data type uses a dropdown, and displays a country's flag and the corresponding country code. Null values are allowed.
Figure 6 shows a list of flag values created using the Country dimension from the source data available to the Writeback table. You can see the linked value Country_vzb_options specified in the Options Field, which defines the flag and the name of the country. If Define Options is selected, the list disappears, and an error is returned.
Figure 6: Flag Options Field
If you manually add a country code in the property panel, the error clears and the flag will be displayed again, but as it's no longer linked to Country_vzb_options, it will be the only value in the list (Figure 7).
Figure 7: Flag Define Options
The radiobutton data type lists several options, using a button to display the selected value, which can include null. Figure 8 shows a list of 2 fields (Yes and No) to answer the question Inspection Required?
When Define Options is used, you can add list items by clicking on the Add Option button, and entering an item Value.
Figure 8: Radiobutton Define Options
To add radiobutton data with the Options Field, click on the button to add an expression using the Qlik Sense Editor (Figure 9).
Figure 9: Radiobutton Options Field
The multiple choice data type also presents a list of options, but more than one option can be selected at any one time. Figure 10 shows a list of 3 multiple choice fields, showing the names of the Inspection Team if an inspection is required.
When Define Options is used, you can add multiple choice items by clicking on the Add Option button, and entering an item Value.
Figure 10: Multiple Choice Define Options
To add multiple choice data with the Options Field, click on the button to add an expression using the Qlik Sense Editor (Figure 11).
Figure 11: Multiple Choice Options Field
Custom Options Sorting
The settings for Custom Options Sorting control the display order for the values in the options field for Dropdown, Flag and Icon data types. If you disable Custom Options Sorting (Figure 12), the default order will be taken from the row number. You can Sort by expression and choose Ascending or Descending order, Sort numerically or Sort alphabetically.
Figure 12: Custom Options Sorting Disabled
Figure 13 shows an example writeback table with Sort alphabetically in Ascending order selected.
Figure 13: Custom Options Sorting Example
If you enable the setting (Figure 14), you can Sort options by Value or Label, and set the Sort options order to Asc (Ascending) or Desc (Descending). When enabled, data is displayed in the existing order used in the Qlik Sense Hub.
Figure 14: Custom Options Sorting Enabled