Set shared data provider

Actions – Abstract

The Set shared data provider action assigns the available input data ($input) to a so-called 'shared data provider'.

The Set shared data provider action assigns the available input data ($input) to a so-called 'shared data provider'. Multiple elements of a form can use the same shared data provider as a data source without having to initialize the data service for each element individually. This technique is particularly common in the context of a Dashboard, where different output formats are often used on a common database.

images/download/attachments/189433852/image-2024-10-10_11-50-41-version-1-modificationdate-1728553840952-api-v2.png

NOTE◄ Linking an element has no effect on this action. If a target element is already linked, the action cannot be selected under Action type.

The optional Data Provider ID parameter defines an identifier for the data provider to which the input data is assigned. The text used can be freely assigned. Elements that use this data provider must refer to this ID.

  • If no Data Provider ID is specified, the (numeric) element ID of the executing element is used as the data provider ID, as suggested by the light grey colored standard text (see image).

Example

Discrete load carriers and their loading and unloading locations along a previously compiled route are entered in a form. The route is defined in the example as a multiple selection of master data items (City). The City selected as the Route should then in turn determine the options in the Combobox for Place of loading and Place of unloading when registering individual load carriers in a Repeatable element container.

Runtime example:

images/download/attachments/189433852/image2020-7-6_10-51-12-version-1-modificationdate-1728553368344-api-v2.png

  • As the view demonstrates, the precise City for the Place of loading can be selected, which is defined by the Multiselect combobox Route above by multiple selection.

  • The entries appear in the Multiselect combobox in the order of their selection.

Configuration:

images/download/attachments/189433852/image-2024-10-10_11-53-46-version-1-modificationdate-1728554026287-api-v2.png

The behaviour shown on the left is configured for the Multiselect combobox Route:

  • The behaviour reacts to the Triggering event Changed with all Change types so that any change to the current selection of locations for the route is always immediately passed on to the shared data provider used.


  • The Behaviour type Static was selected with the default value 'true', so that the Actions on 'true' are executed unconditionally. The input data is transferred unchanged, so that the value of the Multiselect combobox provided by the Triggering event Changed – i.e. a list of the selected City – is passed on as $input to the actions.


  • Under the Actions on 'true', the action Set shared data provider is executed for the Data Provider ID 'waypoints of the route'.

images/download/attachments/189433852/image-2024-10-30_14-23-24-version-1-modificationdate-1730294604019-api-v2.png

For the two Combobox elements Place of loading and Place of unloading, which should offer the City selected via the Multiselect combobox Route as options, the configuration under 'Entries and Services' must be shown as indicated on the left:

  • The 'Shared data provider' type is selected as the Service.


  • The Provider name must match the Data Provider ID from the action.


  • The option 'GenericDataProviderConverter' was selected as the Converter, so that the data set by action is directly available.