@readme

Group data share works just like the standard data share, except that the data is held at the group level.

By creating a task in the group to access the data, the data can be shared. If you don't need to share the data, you could just create a group-level form to maintain the data.

Setup

Install the extension into your Relay instance.

From the Relay module, use the New high-level folder option to create a new Group data share folder.

How to use

From the new folder, create a new task using the New group data share option. You can use the new task just like the standard data share. The data is held in the group.

You can check this by creating an additional task. It will have the same data.

How it works

The example builds on the standard data share component which provides the underlying data and form handling. It clones the standard data share task templates and collections.

In the owner collection, it overrides the saved data to be a call to the group to get the group-level data.

The Group data share overrides the owner task-level save step with a call to the group to write the data. It also defines the group-level steps to read and write the data.

The partner collection inherits from the standard data share partner collection, but overrides the step name for the data.

Customization

To change the form, set the formData binding.

When accessing group data, remember that the group is shared across multiple tasks. You will need to set an appropriate data reference and step name:

  • To change the data reference, set the "dataReference" option in the collection.
  • To change the step name, set the "stepNameData" option in the collection.