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

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,169)