cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Simple Help with Gallery Search

Hi, I have a textinput search box for a gallery with items set as follows:

 

SortByColumns(Filter([@'Clearance List for PowerApps'], StartsWith(Description, TextSearchBox1_1.Text)), "Description", If(SortDescending1, Descending, Ascending))

 

I would like the text input to 1) search text across all list item fields (not just Description), and 2) only show items where User.Email() is in the "Supervisors" Field. 

 

How should I modify the parameters above?

 

Many thanks!

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: Simple Help with Gallery Search

@LYNCHJL 

I've made a few assumptions here

*  Supersivors is a people field with only one value allowed

*  The email property is called 'mail'.  (It might be 'Mail' or 'Email' if my 1st idea does not work).

* ColumnName1, ColumnName2, ColumnName3 are all Text fields

 

Here's my sample code:

SortByColumns(
    Filter(
        [@'Clearance List for PowerApps'],
        Supervisors.mail = User.Email(),
        StartsWith(Description, TextSearchBox1_1.Text)
        Or StartsWith(ColumnName1, TextSearchBox1_1.Text)
        Or StartsWith(ColumnName2, TextSearchBox1_1.Text)
        Or StartsWith(ColumnName3, TextSearchBox1_1.Text)
    ),
    "Description",
    If(SortDescending1, Descending, Ascending)
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Helper II
Helper II

Re: Simple Help with Gallery Search

Thanks for the quick reply, @mdevaney 

 

"Supervisors" is a text field with emails separated by semicolon.  So I assume I would need something along the lines of 

--  User().Email CONTAINED IN "Supervisors"

 

How would I modify to code to accommodate this?

 

Thanks again!

Highlighted
Super User III
Super User III

Re: Simple Help with Gallery Search

@LYNCHJL 

Your way of thinking is correct.  Replace this code...

Supervisors.mail = User.Email()

 

With this code...

User().Email in Supervisors

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,972)