Configure behavior during startup
How to configure app behavior during startup of app-frontend
In applicationmetadata.json there is an option to configure the user interface when a user navigates to a direct link to the application.
This is done in the field onEntry.show where you have the possibility to set the values new-instance (default) or select-instance.
Standard behaviour if this field is not present is to create a new instance for the user.
Select from active instances
Altinn.App.PlatformServices, Altinn.App.Common and Altinn.App.Api.If the field onEntry.show is set to select-instance the user is presented with a list of active instances for the selected reportree when navigating to the application.
Example
The following configuration is added to applicationmetadata.json to configure select from active instance.
{
"id": "ttd/demo-app",
"org": "ttd",
"title": {
"nb": "Starte fra aktiv instans"
},
...
"onEntry": {
"show": "select-instance"
}
}
For users that do not have any active instances, a new instance will be created, while users that have active instances will be presented with the following user interface:

Configure instance selection page
Altinn.App.core and Altinn.App.Api.Using the field onEntry.instanceSelection, you can further customize the instance selection page. The following
options are available:
sortDirection: Choose betweenascordescto sort the instances ascending or descending. Default isasc.rowsPerPageOptions: Choose which options the user can choose between when deciding how many instances to show per page. Default is[10, 25, 50].defaultSelectedOption: Choose which option should be selected as default when the user opens the instance selection page. The value must be a number that is used as an index to select a value inrowsPerPageOptions. Default is0.
Configuration Example
The following configuration is added to applicationmetadata.json to configure the instance selection page.
{
"id": "ttd/demo-app",
"org": "ttd",
"title": {
"nb": "Starte fra aktiv instans"
},
...
"onEntry": {
"show": "select-instance",
"instanceSelection": {
"sortDirection": "asc",
"rowsPerPageOptions": [10, 25, 50, 100],
"defaultSelectedOption": 1
}
}
}
