cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
altafrgmail
New Member

Two option set fields -

I am using the two option set field in CDS and something which worked a bit earlier is not working now. I picked up some code written by someone else - so not sure where things are going wrong. 

 

Facing two issues - 

 

1. Unlike an option set what do you set the Items value of a dropdown i have used to render this field? or is it mandatory to use a toggle when dealing with this data type? 

 

2. When i use CHoices(YEsNo) as the item of the dropdown bound to this  field - i get EDM conversion error message - since option sets are INT while two options seem to be Boolean. 

 

I want to avoid changing field type at this stage when app is in UAT stage - any other way i can use a dropdown to display this field? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
UdayAdhikari
Continued Contributor
Continued Contributor

I think you are missing data source name (need to fully qualify the field name). In canvas app, you can bind Two Options type field to a dropdown control by adding following code:

Choices([DataSourceName].[FieldName])

 

Just tested and it worked for me.

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

2 REPLIES 2
UdayAdhikari
Continued Contributor
Continued Contributor

I think you are missing data source name (need to fully qualify the field name). In canvas app, you can bind Two Options type field to a dropdown control by adding following code:

Choices([DataSourceName].[FieldName])

 

Just tested and it worked for me.

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

v-yutliu-msft
Community Support
Community Support

Hi @altafrgmail ,

Do you want to display the choices of two-options field in a drop down?

Is your data source CDS?

Could you show me :

1)the settings of this field?

2)the settings of the drop down?

I've made a similar test but not met the same problem like your description.

Here's my test for your reference:
1)the field's settings:

6246.PNG

 2)the drop down's settings:

6247.PNG

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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