Hi,
I am creating a field as "Optional Viewers" and it supposed to be a Choices type, but I would like the options in the choices to come from a Lookup table called "Users".
I encountered two issues with it:
- The Choices type in CDS, the options need to be input manually and they are hardcoded
- The Lookup type in CDS, only allow one choice
Datatable in this scenario:
- Contracts table:
- Field: Optional Viewers: type: Lookup to Users (Default table from the system)

- Users table: (Default table from system)
- Field: Full name, email...
Now I am trying to deal with the N:N relationship
*I already set Contract table and User table as many-to-many relationship

My scenario is that I have a Contract table, and will have a gallery to select a specific contract.
Then will navigate to a contract detail page -> Viewform with all contract detail (eg. Contrac name, contract number, PM …) -> Editform for edit contract detail
I would like to create a field that indicated who (From User table) can view this specific contract detail.
Now the field I created from CDS called “Optional Viewers” and is a “Lookup” data type with “User” table
In Editform, I manually change that input box for this field to ComboBox.

And back to Viewform, in this field, I set
Item = ThisItem.'Optional Viewers'
But it will only show ONE record in the Viewform, and also in the database also only has ONE record.
How can it be viewed correctly in Viewform, and save correctly (Many Users) into CDS table? 😥
Thanks in advance 🙏🙏🙏🙏🙏