web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Issue Filtering Data T...
Power Apps
Answered

Issue Filtering Data Table linked to Drop Down Control

(0) ShareShare
ReportReport
Posted on by

Hello, I have a table of Standard Opertaing Procedure's where each record has a Category, Sub-Category (specific to Category), Name, Number, and Description. My goal is to have an initial screen where the user selects the Category and Sub-Category and hits a Search button to go to a Data Table with the SOP's that match the selected Sub-Category. For reference, the Category and Sub-Category drop down controls each utilize a Distinct formula since I only want the drop down to have unique entries.

 

I have been struggling to write the Filter command in the Items property of the Data Table. I have tried to use the following formulas but keep getting Errors:

 

FIlter (SOP_Table, SubCategory = Dropdown2.Selected)

Filter (SOP_Table, SubCategory = Text(Dropdown2.Selected))

Filter (SOP_Table, Dropdown2.Selected in SubCategory)

Filter (SOP_Table, StartsWith(SubCategory, Dropdown2.Selected))

Search (SOP_Table, Dropdown2.Selected, "SubCategory")

Search(SOP_Table, Text(Dropdown2.Selected), "SubCategory")

 

The error message is usually Invalid Argument Type or Unexpected Input. I've tried the Text function to get around the unexpected input but that doesn't work. For a control, I ran the filter command using the selected Sub-Category but just manually entered in quotation marks (" ") to see if the filter command actually works and it filtered properly. 

 

Please help!

Categories:
I have the same question (0)
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Are Category and Sub-Category a text fields on SOP_Table or are they choice fields. Here are some examples assuming you want your Data Table filtered by both category and sub category.

     

    Example if Category and Sub-Category are text fields in SOP_Table:

    Filter (SOP_Table, Dropdown1.Selected = Category, Dropdown2.Selected = SubCategory )

     

    Example if Category and Sub-Category are choice fields in SOP_Table:

    Filter (SOP_Table, Dropdown1.Selected = Category.Value, Dropdown2.Selected = SubCategory.Value )

  • Community Power Platform Member Profile Picture
    on at

    @Jeff_Thorpe, Thanks for the response. Category and SubCategory are both defined as Text in SOP_Table and are not selected from a dropdown in the excel file. I tried both options you suggested and both returned Error, invalid argument type. 

     

    Something I've noticed while trying to figure the formula out, the app recognizes Dropdown1.Selected and Dropdown2.Selected as a Record if that helps.

     

    Thanks,

    Brendan

  • Verified answer
    Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    I should have noticed that before. The dropdown portion needs the column name. Normally that is ".Value" but some times that can be something else depending on the formula in Items. Just put a "." after selected and intellsense should show you your options.

     

    Example if it is ".Value"

    Filter (SOP_Table, Dropdown1.Selected.Value = Category, Dropdown2.Selected.Value = SubCategory )

  • Community Power Platform Member Profile Picture
    on at

    @Jeff_ThorpeThat worked, thank you very much. Dropdown2.Selected.Result worked for me.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard