cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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
Highlighted
Solution Supplier
Solution Supplier

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

Highlighted
Community Support
Community Support

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (7,271)