cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Caddy123
Regular Visitor

Using Common Data option field for SharePoint List

Hi,
I have created a custom entity in the Common Data Service. If a record is changed I would like to send a notification mail (works fine) and add the data to a SharePoint list (works only partially). Fields of the entity that use an optionset instead of text type do not return the selected option but only a numeric code when I transfer the data to the SharePoint list.

Caddy123_0-1605088418216.png

 

Result in SharePoint looks like:

Caddy123_0-1605091526257.png

 

 

Does anybody now how to get the text of the chosen option?

 

Best regards

Caddy123

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @Caddy123 ,

 

If you want to get the option set label from CDS, please try to use the following expression to achieve that:

 

If it's a Common Data Service Connector you used, please try to use '_fieldname_label' schema to get the Label of Option Set(Choice), for example: 

Triggeroutputs()?['body/_fieldname_label'] 

Outputs('Get_record')?['body/_fieldname_label'] 

 

If it's a Common Data Service(current environment) connector you used, please try to use

'fieldname@OData.Community.Display.V1.FormattedValue' shema to get the Label, for example:

Triggeroutputs()?['body/fieldname@OData.Community.Display.V1.FormattedValue'] 

Outputs('Get_record')?['body/fieldname@OData.Community.Display.V1.FormattedValue'] 

 

PS: you can find all field details from Body of CDS output.

Snipaste_2020-11-13_11-59-40.png

Hope this helps,

Sik

View solution in original post

1 REPLY 1
v-siky-msft
Community Support
Community Support

Hi @Caddy123 ,

 

If you want to get the option set label from CDS, please try to use the following expression to achieve that:

 

If it's a Common Data Service Connector you used, please try to use '_fieldname_label' schema to get the Label of Option Set(Choice), for example: 

Triggeroutputs()?['body/_fieldname_label'] 

Outputs('Get_record')?['body/_fieldname_label'] 

 

If it's a Common Data Service(current environment) connector you used, please try to use

'fieldname@OData.Community.Display.V1.FormattedValue' shema to get the Label, for example:

Triggeroutputs()?['body/fieldname@OData.Community.Display.V1.FormattedValue'] 

Outputs('Get_record')?['body/fieldname@OData.Community.Display.V1.FormattedValue'] 

 

PS: you can find all field details from Body of CDS output.

Snipaste_2020-11-13_11-59-40.png

Hope this helps,

Sik

Helpful resources

Announcements
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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,405)