An on-demand app loads a subset of the data that is loaded in aggregate form by a selection app. An on-demand app is constructed by linking an on-demand selection app to an on-demand template app. Selection apps and template apps are the fundamental building blocks of on-demand apps.
To build an on-demand app, selection and template apps that can be linked together must first be created. To be linked, selection and template apps must have data fields in common that can be bound together.
A selection app can be linked to multiple template apps, and a single template app can be linked to by multiple selection apps. But the template app's data binding expressions must correspond to fields in the selection apps that link to it.
An on-demand app navigation link joins a selection app to a template app. On-demand app navigation links are created in selection apps. Once a navigation link has been defined, it can be added to the selection app's App navigation bar as an on-demand app navigation point. Each sheet in an app contains its own App navigation bar. Users then generate on-demand apps from the app navigation point.
Multiple on-demand apps, each containing a different combination of selected data, can be generated from the same app navigation point.
Pointers to a single app navigation link can be added to multiple sheets in the same selection app. Also, sheets can have multiple app navigation points, created from multiple app navigation links.
When a selection app is complete with navigation links and navigation points, on-demands can be generated.
Do the following:
- Open an on-demand selection app and select Edit.
- Select App navigation links from the panel on the left side.
Click the Create new button to open the Create new On-demand app navigation link dialog.
- Name the new on-demand app navigation link.
Select an On-demand template app.
Not all the apps in the Template app drop-down list are valid template apps. You must select an app that has been constructed as a template app and whose data binding expressions correspond to fields in the selection app you are working with. Otherwise, the on-demand apps generated from the app navigation link will produce errors.
For more information, see Creating an on-demand template app.
Write an expression that computes the total number of detail records that are represented by the aggregate records accessible by way of the selection state in the selection app.
The expression usually uses the SUM function to obtain a total of the records selected. The result is used to determine when the amount of data to load is within the range specified for generating the on-demand app.
Specify the Maximum row count.
The Maximum row count value sets the upper limit on the number of records, computed by the function in the Expression entry, that the on-demand app can load. As long as the number of records as computed by the row estimate expression in the selection app is greater than the Maximum row count value, the on-demand app cannot be generated. The app can only be generated when the number of records computed by the row estimate expression is at or below the upper limit set by the Maximum row count value.
To create the expression used for Maximum row count, you must know how the total record count is computed from fields available in the selection app.
For more information, see Creating an on-demand selection app.
Specify the Maximum number of generated apps.
Multiple on-demand apps can be generated from the same on-demand app navigation point on the selection app's App navigation bar. The reason for generating multiple apps is that each one can contain a different selection of data. When the maximum number of apps has been generated, the user who is generating apps from the navigation point must delete one of the existing apps before generating a new on-demand app.
The maximum number of generated apps applies to the on-demand app navigation link. If one on-demand app navigation point is created from the navigation link, then that navigation point would be able to create up to the maximum number. But if multiple navigation points are created from the same navigation link, then the total number of on-demand apps generated from those navigation points is limited to the setting for Maximum number of generated apps.
Enter a numeric value in the Retention time field for the length of time apps generated from the navigation link will be retained before they are deleted.
In the drop-down menu to the right of the Retention time field, select the unit of time for the retention period.
The options for retention time are hours, days, or Never expires.
All on-demand apps generated from the navigation link will be retained according to this setting. The age of a generated on-demand app is the difference between the current time and the time of the last data load. This calculation of an on-demand app's age is the same for published and unpublished apps. And if an on-demand app is published manually after it has been generated, the age calculation remains the same: it is based on the last data load of the generated app.Information noteThere is also a retention time setting in the On-Demand App Service that applies to apps generated by anonymous users. That setting does not affect the retention time for users who are logged in with their own identity. For apps generated by anonymous users, the retention time is the shorter of the Retention time setting on the navigation link and the On-Demand App Service setting, which is set in the Qlik Management Console.
In the Default view when opened drop-down menu, select the sheet to display first when the apps generated from the navigation link are opened.
You can select App overview or one of the sheets in the selection app from which the navigation link is created.
Select a stream from the Publish to drop-down menu where apps generated from the navigation link will be published.
You must have permission to publish on the stream you select. If you do not have Publish privileges on the selected stream, attempts to generate on-demand apps from the navigation link will fail.
When selecting a stream to publish generated apps to, you must be sure the intended users of the on-demand app have Read privileges on the stream.
You can also select Not published (saved to workspace) to save the generated apps in the users workspace without publishing them.Information noteIf anonymous users will be allowed to use a published selection app, the on-demand app navigation links should be configured to publish to a stream that anonymous users can access. If on-demand apps generated from the navigation link are not published automatically, anonymous users will get an error message when they try to generate those apps.
After an app has been generated, it can be published manually.
- Click Create and the new on-demand app navigation link will appear in the list of App navigation links.
Drag the app navigation link to the App navigation bar on the selection app.
Dragging the app navigation link onto the selection app creates an on-demand app navigation point. The properties of the new on-demand app navigation point are displayed in the panel on the right side. You can change the name of the navigation point there if you wish.
Click Done in the sheet editor.
The on-demand selection app is now ready to use or publish. Users of the selection app will be able to generate on-demand apps from the navigation points on the App navigation bar in the selection app.