Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Can you create a dropdown with the names of a column in a table?

(0) ShareShare
ReportReport
Posted on by 821 Super User 2025 Season 1

I am trying to super simplify the ability to search a table. One though is that I could create dropdown that would list the column names of a table and provide a text field to enter text for a search on the column chosen. Is this possible? Either that or provide a second dropdown that had the results of the column chosen from the first dropdown.

Categories:
  • futr_vision Profile Picture
    821 Super User 2025 Season 1 on at
    Re: Can you create a dropdown with the names of a column in a table?

    I can see going this route if I want to programmatically grab the column names. I don't want all of the columns however. I think @swaminawale might have hit on a more simplistic and precise way of handling this although it does involve the manual input of the column names. I need to think about this a little more. Ideally I want to get to a solution that is going to save me real estate in my app since the results section is going to have a lot of data and I prefer not having to make the user scroll or navigate around alot.

  • futr_vision Profile Picture
    821 Super User 2025 Season 1 on at
    Re: Can you create a dropdown with the names of a column in a table?

    Creating a dropdown to select a column to search could be overkill if I can just use a search box as @AARON_C suggested. However, I can see using a dropdown if I need to do something other than or in addition to a text search. For example, if one of my columns was a start date of the type date then selecting that in the dropdown might swap out the text field for search with a date picker.

  • futr_vision Profile Picture
    821 Super User 2025 Season 1 on at
    Re: Can you create a dropdown with the names of a column in a table?

    This sounds like a super simple solution if I can use a single text box and search columns that are searchable and that I designate should be searched. I'll need to test this out as I get further down the road with this build.

  • v-qiaqi@microsoft.com Profile Picture
    on at
    Re: Can you create a dropdown with the names of a column in a table?

    Hi @futr_vision,

    Do you want to select column names from dropdown?

     

    Actually, we could using the following formula to achieve this:

    ClearCollect(
     colTable1,
     TableName
    );
    
    // get the column headers
    Set(
     varColumnNames,
     Distinct(
     Ungroup(
     MatchAll(
     JSON(
     colTable1,
     JSONFormat.IgnoreBinaryData
     ),
     "([^""]+?)""\s*:"
     ).SubMatches,
     "SubMatches"
     ), Value)
    )

    Then populate the dropdown with the variable:

    varColumnNames
  • swaminawale Profile Picture
    195 on at
    Re: Can you create a dropdown with the names of a column in a table?

    Hi @futr_vision ,

     

    You can do it and it is possible. In my recent project I did the same.

     

    I've created a dropdown and in that I manually entered the column names ( because I didn't need all columns) and had a text input next to it. then applied a filter formula.

     

    Same way you can achieve it. 

  • AARON_C Profile Picture
    2,233 Most Valuable Professional on at
    Re: Can you create a dropdown with the names of a column in a table?

    Hi @futr_vision,

     

    You can just use the Search function on the Items property of your gallery. Search only works with columns that are of type Text. This would looks something like:

     

     

    Search('Data source', TextInput1.Text, "Column 1", "Column 2", "Column 3")
    
    // Change TextInput1 to your Text Iput name
    // Change Columns 1, 2, 3 to Columns in your Data source you would like to search

     

     

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard