cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Hanele
Frequent Visitor

Error message: "expected type of Table for Optionset"

Hi, 
I wonder if someone could explain what I´m doing wrong:
I´m developing an embedded app on Dynamics 365 form.
I´m creating a new record in CDS with Patch function. 
One of the field causes a strange error:

Patch(
Notifikace, //the etity name
Defaults(Notifikace),
{
Notifikace:NewGuid,
Kanál: 'Kanál notifikace'.Email,
...
}
where Kanál (in_Channel) is of a Choices type field, 
the Choice/optionset itself 'Kanál notifikace' (in_notificationchannel) is a global optionset/choice
Email is an option from the optionset

I´m getting the following error message:

"The type of this argument ´(in_channel)´ does not match the expected type ´Table´. Found type ´OptionSetValue´."

I´m super confused as it is an optionset field with a global optionset...What table does it want?
Thaks for your help
Hana

2 REPLIES 2
Drrickryp
Super User
Super User

Hi @Hanele 

Shane Young, @Shanescows has a video about using option sets in CDS here.  https://www.youtube.com/watch?v=1L633HIvNGE .  You will find the answer to your question as well as many very helpful tips about how to use option sets in Dataverse. 

Hanele
Frequent Visitor

Hello @Drrickryp ,

thanks for the tip, the video is great,
unfortunatelly it did not answer my question as I think I follow the rules in my Patch function:

Column name (option set type): OptionSetName.Option

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,868)