cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ywliang96
Level: Powered On

How to convert from two option data to text field?

I created a new field which uses two option for user to select "Yes" and "No". 

 

And I wished to have a set of question appear or hide according to that selection of "Yes" and "No" where if it's Yes the question will popped up and otherwise.

 

I created a formula below and I connected the dropdown to the new field I created.

If(Dropdown1.Selected.Value="No",false,true)

 

The problem I getting was incompatible in data types. I tried disconnecting the dropdown items with the new field I created and I went to insert a code ["Yes","No"] in the Items section of the Dropdown1 then input the formula again on to the Visible section of the question I would like to pop up or not with the code below 
If(Dropdown1.Selected.Value="No",false,true)

And It worked. It only worked if I input the option values through coding instead of connecting the dropdown with the field I just created. May I know how can I convert the two option data type to text? 

2 REPLIES 2
Edwin-Abdalian
Level 10

Re: How to convert from two option data to text field?

What is your data source? is it Sharepoint? if it's SP then what is the Name and Type of the YesNo column that you created? is it a Yes/No type column? if yes, you need to pass a boolean in your formula in PowerApps, not a text

Community Support Team
Community Support Team

Re: How to convert from two option data to text field?

Hi @ywliang96 ,

Could you please share a bit more about your data source? Is it a CDS Entity?

Is the New field you added a Two Options type column in your CDS Entity?

 

If the New added field is a Two Options type column in your CDS Entity data source, I think there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:

Set the Items property of the Dropdown box to following:

Choices('NewFieldName (YourEntity)')

Then modify your If formula as below:

If(
Dropdown1.Selected.Value = 'NewFieldName (YourEntity)'.No,
false,
true
)

Please consider take a try with above solution, then check if the issue is solved.

Note: The 'NewFieldName' represents the Two Option type field in your CDS Entity.

 

Best regards,

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

Helpful resources

Announcements
thirdimage

Power Platform 24

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (5,542)