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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,210)