cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wangl2
Frequent Visitor

Turn Text Label to Drop Down Menu

Dear All,

In my PowerApps, I use an Excel Spreadsheet as the data source. One of the column I would like the user to do in the App is to choose "Yes" or "No" in the Text Label when editing.

Do I need a separate list with "Yes" and "No" like how you make a drop-down in the Excel?

Is there quicker and easier way to do it within PowerApps Studio?

Thank you all.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support
Community Support

Re: Turn Text Label to Drop Down Menu

Hi @wangl2 ,

Do you want to configure one Text field in your Edit form as a Dropdown option list?

 

Based on the needs that you mentioned, I think you could consider change the Control type of the corresponding Text field in your Edit form to "Allowed values" option as below:

Test.gif

 

 

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.

View solution in original post

Community Support
Community Support

Re: Turn Text Label to Drop Down Menu

Hi @wangl2 ,

Based on the issue that you mentioned, I think this issue is related to that --  you have unlocked the field data card in your Edit form.

 

As an fixed solution, please consider remove the target field from your Edit form, and then re-add it again within your EDIT form, then try above solution I provided, check if the issue is solved.

Note: Please make sure the target field is not unlocked within your Edit form.

 

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.

View solution in original post

9 REPLIES 9
Dual Super User
Dual Super User

Re: Turn Text Label to Drop Down Menu

Hi @wangl2 

 

You can save the column as a text field in the excel and create a dropdown control for the user to select Yes or No values.

Dropdown Control: Items -> ["Yes","No"]

If you are using edit forms to save the details back to excel, then you can update the configuration as:
1) Select the datacard from the left menu and unlock the properties in the Advanced tab on the right menu.
2) Delete the text input for the field and add the dropdown inside the datacard.
3) Add the items property of the dropdown to: ["Yes","No"]
4) Set the "Update" property of the datacard as: Dropdown1.Selected.Value

Note: If you see any other coordinate based error due to the deleted text input control, then you can replace the text input control name with the dropdown control name in those expressions.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Super User
Super User

Re: Turn Text Label to Drop Down Menu

@wangl2 

Agreed with @yashag2255.  The code ["Yes","No"] is an excellent method to manually define the options in a dropdown when they cannot be automatically populated from some datasource.

Community Support
Community Support

Re: Turn Text Label to Drop Down Menu

Hi @wangl2 ,

Do you want to configure one Text field in your Edit form as a Dropdown option list?

 

Based on the needs that you mentioned, I think you could consider change the Control type of the corresponding Text field in your Edit form to "Allowed values" option as below:

Test.gif

 

 

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.

View solution in original post

wangl2
Frequent Visitor

Re: Turn Text Label to Drop Down Menu

Thanks @v-xida-msft for the reply.

I tried to follow up but got stuck. When I select the data card and select the Edit Field, I do no see the "Control Type" and other options like you showed in the Gif. All I can see is the purple writing saying "Learn more about the Custom Cards".

This is after I unlock the property.
What did I miss?

wangl2
Frequent Visitor

Re: Turn Text Label to Drop Down Menu

Thanks @yashag2255 for your reply.

I got confused on the step 2 when you said.:

2) Delete the text input for the field and add the dropdown inside the datacard.

 

Do you mean I actually delete the text box and insert a drop down control to the same area?

Thanks.

Community Support
Community Support

Re: Turn Text Label to Drop Down Menu

Hi @wangl2 ,

Based on the issue that you mentioned, I think this issue is related to that --  you have unlocked the field data card in your Edit form.

 

As an fixed solution, please consider remove the target field from your Edit form, and then re-add it again within your EDIT form, then try above solution I provided, check if the issue is solved.

Note: Please make sure the target field is not unlocked within your Edit form.

 

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.

View solution in original post

Dual Super User
Dual Super User

Re: Turn Text Label to Drop Down Menu

Hey @wangl2 

 

Yes, that is what I mean. Since you want to remove the Text input and add a dropdown in place of it, you need to remove the existing text box and add a dropdown in its place.

I have added a gif to walk you through the process.

332.gif

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
wangl2
Frequent Visitor

Re: Turn Text Label to Drop Down Menu

I have removed the data card and insert it again using "Edit Field". 

When I insert the data card, I can see the option for control type and selected "Allowed Values"

Nice and easy!

Thank you @v-xida-msft !

wangl2
Frequent Visitor

Re: Turn Text Label to Drop Down Menu

Hi @v-xida-msft ,

I don't know whether this is a PowerApps bug but this is happening after I configured the Allowed Value ["Yes","No"] for the data card.

 

So let's say on one record, this data card value shows as blank on the details form, because we never edit it and provide any value. When you go to edit it, in the edit form, this field will automatically becomes "Yes" before I even do anything. If you quit without saving it, the details form will show this record blank again on this data card. If you save it, the details form will show this record as the value you saved as, whether it is a "Yes" or "No". I understand this but just feels weird that when you go to edit and the "Yes" already appear there. You quit the edit form and the value will show blank again. But this is not the bug I am talking about.

 

When you edit a record for this Data Card, for example, the Allowed Value is set to ["Yes","No"]. So when you first edit it, it always will default to a "Yes". Then I change the value from the Dropdown to a "No". I then save the record. 

 

Back to the details form, I pick another record and edit it again. The "Allowed Values" data card for this second record will show as a "No". It kind of remembers what I did to the first record. And if I now quit the edit without changing anything, you can see the value in the data card quickly flash back to the default, which in this case is a "Yes". 

 

Now if I edit this second record again, the data card will now show a "Yes", as expected. However if I edit the first record, without changing anything, just quit the edit straight away. Because the first record has set to a "No", I open another any record, it will show as a "No". It just repeats.

 

Do you experience that or did I do anything wrong?

Thank you! 

Helpful resources

Announcements
secondImage

Community User Group Member Badges

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

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

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