Add/Remove Values from list field using option set

I am working on an app that records required readership for staff. I have a table called DocCtrl that contains a list of document attributes (e.g. doc name, version, author, etc.). One of the fields of this table is called Training Map, which is a List from the Option Set: Training Maps.

What I am trying to accomplish is to allow the user to edit the document information and then select the groups that need to read the document by clicking the toggle switch for each required group (see sample below).

The green area is a repeating group with the following properties:
Type of content: Os Training Map
Data Source: Parent group’s DocCtrl’s Training Map

The toggle buttons are what I want to use to display if item in the list is selected.

The problem is, I would like the repeating group to display all the items in the OS Training Map, regardless of whether or not it appears in the list field, and I would like the toggle button to be on or off dependent on whether or not that group has been selected.

Any help would be appreciated.

Make a repeating group with data type set to the Option Training Map and the source is All Option Training Map.

For the toggles, set conditionally for it to be on, based on 'current cells option training map is in DocCtrl’s Training Map list field. If you are setting this up for them to be able to add/remove items from the list field via the toggle, you’ll need to incorporate a custom state as a list and use that as the condition to turn on or off based on current cells Option is in Custom State list…so on page load, set the custom state to the DocCtrls Training Map and then when user is done, press button to save and set the DocCtrls Training Map Option list field to the custom state value.

Thanks for this! The visual portion is working now. I will continue on to add/remove items from the list via the custom state as you suggested.

I’ll let you know how it goes.

Thanks again.

1 Like