Datagrid 2 pre select multi select options - remember selected options for later

0
I am making a visitor management system, and in that there is an entity "Visitors" which has reusable information on every unique visitor such as name, DOB, Company etc...  I also have an entity "Visitor" which is tied to the "Visitors" in a many to one. The idea of this entity is that it will hold one time information about a "Visitors" visit such as when they checked in, parking information, approval status...   There is also a "Visit" entity which is linked to "Visitor" but that is not relevant, the idea is that 1 "Visit" has many "Visitor"(s) and then each "Visitor" will be linked back to a central table "Visitors" where they are selected from, and later down the line I can see information about a "Visitors" visit from 3 years ago.   I have setup a datagrid2 on a pop up with multi select of the "Visitors" entity, so a user can search and select visitors and then at the end click "add" and it will create the "Visitor"(s) entities tied to the visit. My issue then comes if I want to later add or remove someone, the datagrid2 will have lost the selected items and will no longer highlight them and allows the same "Visitors" to be added multiple times.   When the "Visitors" are added they are provided in a list and is very easy, I am looking for a way to now provide that same list to the datagrid2 so that they are pre-selected   Many thanks  
asked
1 answers
0

image.png

 

Here is a picture of my domain model, the main entity of the datagrid2 is "Visitors"

 

"Visitors" is a list of every unique visitor

"Visitor" is then created when a "Visitors" is assigned to a visit, this means that visitors can have multiple visits to site at one time and then data about each visit can be stored

"Visit" is the details about a visit 

 

When a "Visitors" row from the datagrid2 is clicked I have a toggle microflow that either creates or deletes their "Visitor" entity

 

I do not have a dataview 

answered