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
I have tried two things:
- I set the field as Choices and only input a random option from CDS, and tried to Patch a list in the App, but the Patch function doesn't work well with the Choices column
ForAll(Optionviewerslist,
Patch(Contracts,
{'Optional Viewers': IsBlank()},
{'Optional Viewers': Optionviewerslist.Value}))
*Optionviewerslist is a collection I collected from the Lookup table (Users)
This would give me an error that shows"You're updating expects an 'OptionSetValue', type and you are using a 'Text' type."
2. I tried to set the field as Lookup type, and manually change the input box from an Editform in the app to a Combo Box, but in the CDS record, it still only can save one record.
Is there any suggestion I can resolve the Choices type with the options from a lookup table?
Thanks a lot🙏🙏🙏🙏🙏