How to Convert Textbox to Dropdown in Power Apps?

In this Power Apps tutorial, I will explain how to convert textbox to dropdown in Power Apps.

Here, I will show you how to set up an Excel sheet and format it as a table. Then, I will show you how to upload the Excel file to any cloud database [OneDrive, OneDrive for Business, etc…] and how to create the Power Apps Canvas app from Excel directly.

Last, I will show you how to change Text input to a Dropdown list in the Power Apps canvas app.

Convert Textbox to Dropdown in Power Apps

Here, we will see how to add a Power Apps dropdown list from Excel with a simple scenario. And then, I will show you how to convert textbox to dropdown in Power Apps. To work around this, follow the below steps:

1. Setup an Excel Sheet and format it as a table

  • I have an Excel Sheet named “IT Companies“. Inside this, I have added two columns with respective records.
Column NameData Type
Company NameText
LocationChoice
  • Here, for the Location column values, I have added another sheet to create one dropdown list [Locations]. Then, I said those values in the “Location” column based on the below Data Validation.
Source: = =Sheet2!$A$2:$A$5
Convert Textbox to Dropdown in Power Apps
  • After adding data to the Excel sheet, you should set up the Excel Sheet Format As a Table, and also check the My table has headers option. Also, add a Table Name as “Companies”.

Refer to the below screenshot:

Power Apps Dropdown List From Excel Sheet
  • In the same way, you can also set the “Locations dropdown” as a Table Format and add a Table Name as “Locations” in Sheet2 as well.
Convert Textbox to Dropdown in Power Apps
  • Once the Excel Sheet is ready, please save it to your local device.

2. Upload the Excel file to any cloud database like OneDrive for Business

  • Now, open OneDrive for Business -> Click on the + Add new button -> Select Files upload option -> Select respective Excel file [Companies] from your local device -> Click on the Open button.
How to Add Excel Dropdown List to Power Apps
  • Once the Excel file is added, it will appear under the “All” files dropdown, as in the screenshot below.
How to Add Excel Dropdown List to Power Apps app

3. Create a Power Apps Canvas app from Excel [Directly]

  • Next, we need to create a Power Apps Canvas app from an Excel Sheet.
  • For that, Open Power Apps with your respective Microsoft credentials -> Click on the + Create option -> Create your app from Excel, as in the screenshot below.
powerapps convert textbox to dropdown
  • Next, select your OneDrive for Business connection -> Choose an Excel file -> Choose a table -> Click on the Connect button.
power apps convert textbox to dropdown

Once it connects, it will take a few minutes to create a Canvas app with three different screens. Such as:

  1. BrowseScreen1: This screen will browse all Excel file records
  2. DetailsScreen1: We can use this screen to display the selected item records
  3. EditScreen1: If you want to edit or update any specific item, then use this screen to edit
How to create dropdown from excel in Power Apps app

4. How to change Text input to a Dropdown list in Power Apps

Whenever a user wants to add a new record in Power Apps’ new form, it will not give the dropdown values. Here, we will get only Text input control to add a choice field.

power app drop down list from excel
  • However, it is the not right way to add value to the location field. Here, we can only choose a value from the Excel dropdown list.
  • For that, select the + Add data -> Select a data source as OneDrive for Business -> Choose an Excel file [Companies.xlsx] as shown below.
power apps drop down list from excel
  • Next, Choose the Excel table [Locations] -> Click on the Connect button.
  • Once it is connected to the app, you will get a data source under the Data section like below.
powerapps dropdown add values from excel
  • Now, select the Power Apps EditForm1 -> Select Edit fields option -> Choose Location DataCard and change the Control type to Allower Values as in the screenshot below.
powerapps convert textbox to dropdown
  • Then, you should change the DataCardValue Items property like below.
Items = Locations

Where,

  1. Locations = Excel Table Name
Convert Textbox to Dropdown in Power Apps
  • Whenever you change the Items property, it will give an Error like “Name isn’t valid. ‘Value’ isn’t recognized“.
  • To resolve it, you can change the Location_DataCard Update property to the code below.
Update = DataCardValue5.Selected.Locations

Where,

  1. DataCardValue5 = Dropdown List Name
  2. Locations = Excel Table Name
How to Convert Textbox to Dropdown in Power Apps

5. Save, Publish, Preview, and Run the app

  • Once your app is ready, provide the name and click on the Save button. Then, Publish your app by clicking the Publish this version button as shown below.
How to Convert Power Apps Text to Dropdown from Excel
  • Now, we find our app under the Apps section and click on the Play button to run the app.
Change a Power Apps Text to Dropdown using Excel
  • Once click on the play button, it will redirect you to the Browse screen. When a user wants to create a new record, just click on the + icon, and it will navigate to the new form.
  • Here, provide the new record details and select the Submit icon, as shown below.
Change Power Apps Text to Dropdown using Excel
  • See here; the new record will be added to the Power Apps and the Excel sheet.
create dropdown in power apps from excel

This is how to convert textbox to dropdown in Power Apps.

You can check out a video on the same.

Conclusion

From this Power Apps tutorial, we learned all about how to convert textbox to a dropdown in Power Apps, including:

  • Setup an Excel Sheet and format it as a table
  • Upload the Excel file to any cloud database like OneDrive, OneDrive for Business, etc…
  • Create a Power Apps Canvas app from Excel
  • How to change Text input to a Dropdown list in Power Apps
  • Save, Publish, Preview, and Run the app

You may like: