cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
aman_varama
Level: Powered On

Filter Gallery using multiple input text

Hi,

 

I am trying to filter gallery using multiple input boxes, and the same time i am trying to set permission to see only item which was created by current user using Author.Email = User().Email.

I can filter using one Input Box easily but it doesn't work for multiple input boxes, here is the formula i tried and attached the screenshot of my app.

 

Working with one Input Box:

Gallery.Items = Filter([@FilterMasterList],StartsWith(Title,txtSearchBox.Text)||StartsWith('Product Name',txtSearchBox.Text)||StartsWith('Request Status'.Value,txtSearchBox.Text)||StartsWith(FullName,txtSearchBox.Text))

If i replace txtSearchBox.Text, something like below....

 

Filter([@FilterMasterList],StartsWith(Title,txtSearchBox.Text)||StartsWith('Product Name',txtSearchBox.Text)||StartsWith('Request Status'.Value,txtSearchBox.Text)||StartsWith(FullName,txtSearchBox.Text)) || StartsWith(FullName, txtProductNameFilter.Text))

It simply doesn't work.

Also how to show only those items which was created by current user?

1 ACCEPTED SOLUTION

Accepted Solutions
aman_varama
Level: Powered On

Re: Filter Gallery using multiple input text

thanks @yashag2255, i worked it out differently. 

posting it here, it may help someone..

SortByColumns(
Filter(
[@FilterMasterList],
If(
IsBlank(txtSearchBox.Text),
true,
txtSearchBox.Text in Title || txtSearchBox.Text in FullName || txtSearchBox.Text in 'Product Name' || txtSearchBox.Text in 'Request Status'.Value
) && If(
IsBlank(txtRequestIdFilter.Text),
true,
txtRequestIdFilter.Text in Title
) && If(
IsBlank(txtReqNameFilter.Text),
true,
txtReqNameFilter.Text in FullName
) && If(
IsBlank(txtProductNameFilter.Text),
true,
txtProductNameFilter.Text in 'Product Name'
) && If(
IsBlank(txtStatusFilter.Text),
true,
txtStatusFilter.Text in 'Request Status'.Value
) && If(
lblShowOnlyToAuthUsers.Text = "false",
Lower(Author.Email) = GetCurrentUserEmail,
true
)
),
"ID",
If(SortDescending1, Ascending, Descending)
)

Thank you!

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: Filter Gallery using multiple input text

Hi @aman_varama 

 

This is not working because of the bracket mismatch, StartsWith is written when the Filter expression is closed. Can you try to update the expression to:

Filter([@FilterMasterList],StartsWith(Title,txtSearchBox.Text)||
StartsWith('Product Name',txtSearchBox.Text)||
StartsWith('Request Status'.Value,txtSearchBox.Text)||
StartsWith(FullName,txtSearchBox.Text) ||
StartsWith(FullName, txtProductNameFilter.Text))

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

aman_varama
Level: Powered On

Re: Filter Gallery using multiple input text

thanks @yashag2255, i worked it out differently. 

posting it here, it may help someone..

SortByColumns(
Filter(
[@FilterMasterList],
If(
IsBlank(txtSearchBox.Text),
true,
txtSearchBox.Text in Title || txtSearchBox.Text in FullName || txtSearchBox.Text in 'Product Name' || txtSearchBox.Text in 'Request Status'.Value
) && If(
IsBlank(txtRequestIdFilter.Text),
true,
txtRequestIdFilter.Text in Title
) && If(
IsBlank(txtReqNameFilter.Text),
true,
txtReqNameFilter.Text in FullName
) && If(
IsBlank(txtProductNameFilter.Text),
true,
txtProductNameFilter.Text in 'Product Name'
) && If(
IsBlank(txtStatusFilter.Text),
true,
txtStatusFilter.Text in 'Request Status'.Value
) && If(
lblShowOnlyToAuthUsers.Text = "false",
Lower(Author.Email) = GetCurrentUserEmail,
true
)
),
"ID",
If(SortDescending1, Ascending, Descending)
)

Thank you!

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

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