cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
naijacoder
Helper III
Helper III

multiple filters and conditions on a gallery items property - powerapps

Hi All,
I'm quite new with powerapps and i'm having it difficult regarding how i can

- Have multiple filters e.g on a gallery (items property)

- Have multiple if statements?
Sometimes I see semicolon being used sometimes comma

 

For example in one of the scenario i'm strugging with is:
I have a gallery i inserted showing data from a sharepoint list

 

 

As you can see below the search items textbox works ok but as highlighted i also have a dropdownlist

(showing Test)

Capture.PNG

What i want to be able to do:-

Is to be able to filter the gallery using the dropdown list.

How do i combine this two below together in the items property of the gallery

 

SortByColumns(Filter([@ClientPowerApps], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending)

and 

Filter(ClientPowerApps,'Last Name' = Dropdown1.Selected.'Last Name')

 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
rsaikrishna
Dual Super User
Dual Super User

@naijacoder 

 

Update the formula in Items property as below:

 

SortByColumns(Filter([@ClientPowerApps], StartsWith(Title, TextSearchBox1.Text),'Last Name' = Dropdown1.Selected.'Last Name'), "Title", If(SortDescending1, Descending, Ascending)

 

Add additional condition in the Filter function. It accepts multiple conditions.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

1 REPLY 1
rsaikrishna
Dual Super User
Dual Super User

@naijacoder 

 

Update the formula in Items property as below:

 

SortByColumns(Filter([@ClientPowerApps], StartsWith(Title, TextSearchBox1.Text),'Last Name' = Dropdown1.Selected.'Last Name'), "Title", If(SortDescending1, Descending, Ascending)

 

Add additional condition in the Filter function. It accepts multiple conditions.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (57,123)