Always one selected value
You can select the Always one selected value for a field in an app. The value specifies that one, and only one, value is always selected for a field. You can use this value to specify, for example, that one currency is always selected for a field.
Consider the following when using the Always one selected value:
- You can use the Always one selected value on one or more fields.
- You cannot clear the Always one selected value setting when viewing a sheet. You can, however, clear the setting by editing the sheet in your workspace.
- When you publish an app with the Always one selected value selected, the value is applied to all sheets in the app. The app consumer cannot clear the value.
- When you duplicate an app, the Always one selected value is duplicated with the app.
- When you export an app without data, the Always one selected value is not exported with the app.
- The Always one selected value is not supported for derived fields.
You can use the value with a default bookmark in to highlight specific selections for your app consumer. For an example, see Always one selected value and default bookmark example: Controlling selections to guide app consumers to insights.
For more information about default bookmarks, see Setting a default bookmark to create an app landing page.
Set the Always one selected value
Do the following:
- Open a sheet in an app.
- Click Edit sheet.
- Click Fields.
- Right-click a field, and then click Field settings.
- In the window that opens, select the Always one selected value check box, and then save.
-
Click Done to finish editing. The value appears as a tab in the top toolbar. Unlike a bookmark, there is no option to clear the selection.
The Always one selected value defaults to the first entry in the field. In the example above, the value is applied to Currency. CHF is the currency that is selected by default. You or your app consumer can change this selection, in this case to a different currency.
- To test that the Always one selected value is working properly, close and then reopen the app. The value should be shown in the top toolbar.
To remove the Always one selected value for a field, right-click the field in Edit mode, click Field settings, and deselect the Always one selected value check box.
Always one selected value and default bookmark example: Controlling selections to guide app consumers to insights
In this example, we set Always one selected value for a field. We then specify a default bookmark for the app. By specifying a default bookmark, and enabling Always one selected value, we control what our app consumers see when they open our published app.
-
Here is a sheet in our app before the Always one selected value and a default bookmark are applied. This should be the sheet that you want app consumers to see as a landing page when they open the app.
For the Amount measure in the chart above, we used this expression: =sum(DISTINCT {<Currency=>} Amount_LOCAL)* RATE
-
To ensure that one, and only one, value is always selected for the Currency field, we edit the sheet, click Fields, and then right-click Currency.
-
We then select the Always one selected value check box and save.
-
When we close Edit mode for the app, the Always one selected value value appears as a tab in the top toolbar. The value defaults to the first entry in the field, in this case the value is CHF.
-
However, we want to show expenses in Euro when the app is opened. So we select Euro from the Currency field, and then click Bookmarks to create a new bookmark for Currency("EUR"). We then right-click the Currency("EUR") bookmark, and click Set as default bookmark.
Now, when we open the app, or publish the app for an app consumer, the app opens with one value selected, and the default bookmark is shown. The app is opened on the sheet of the bookmark instead of the app overview.