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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Display Items in Gallery
Power Apps
Answered

Display Items in Gallery

(0) ShareShare
ReportReport
Posted on by 111

I have a list named Office Documents and within that list I have a Status column which is Single of text, Position column which is choice column and office which is also a choice column .

In the gallery I have displayed everything that is created by current logged in user only  ( 100s of them ), but I want to filter that by one dropdown selected value (offices) and a search inputttext box , this inputtext text should only search position and status column. 

SortByColumns(
 If(
 Dropdown2.Selected.Value = "All Offices" , Filter('Office Documents', 'Created By'.DisplayName = varCurrentUser ),
 Dropdown2.Selected.Value <> "All Offices", Filter('Office Documents', Office.Value = Dropdown2.Selected.Value)
 Filter('Office Documents', TextInput4.Text in 'Position Title'.Value || TextInput4.Text in Status)
 
 ),
 varSortColumn,
 varSortDirection 
)

This works for the dropdown, but does not work for the search Textinput box.Capture.PNG

Please help.

Categories:
I have the same question (0)
  • Verified answer
    JohnM86 Profile Picture
    590 on at

    There are a couple of issues with the formula you provided. One issue is that there is a missing comma between the filter conditions for the Dropdown2.Selected.Value <> "All Offices" and TextInput4.Text in 'Position Title'.Value. Another issue is that the filter condition for Status should use the dot notation to access the value of the Status column.

    Here is a modified formula that should work for your scenario:

     

    SortByColumns( If( Dropdown2.Selected.Value = "All Offices", Filter('Office Documents', 'Created By'.DisplayName = varCurrentUser && (IsBlank(TextInput4.Text) || TextInput4.Text in 'Position Title'.Value || TextInput4.Text in Status.Value)), Dropdown2.Selected.Value <> "All Offices", Filter('Office Documents', Office.Value = Dropdown2.Selected.Value && (IsBlank(TextInput4.Text) || TextInput4.Text in 'Position Title'.Value || TextInput4.Text in Status.Value)) ), varSortColumn, varSortDirection )

     

    This formula filters the 'Office Documents' list based on the selected value of the Dropdown2 and the text entered in the TextInput4. It checks if the TextInput4 text is present in either the 'Position Title' or 'Status' column values. The IsBlank function is used to check if the TextInput4 is empty, so that the filter doesn't apply when the TextInput4 is empty. Finally, the SortByColumns function sorts the filtered records based on the specified column and direction.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard