cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Marktvc
Frequent Visitor

Drop-Down Items not Showing with Filter

Hi All,

 

I have pushed my sharepoint list (Client Jobs) to PowerApps.  I'm looking to filter the BrowseGallery by a Status Drop down.  The current list of options are:

 

10 - New
20 - Approved
30 - Scheduled
40 - In Progress
50 - Completed
99 - Cancelled

 

 

The current code is:

 

SortByColumns(Filter('Client Jobs', StartsWith(Title, TextSearchBox1.Text)),"Title" , If(SortDescending1, Descending, Ascending))

 

I can see this allow filters based on the Search Text box (I would like to keep this functionality) but first exlude data where the Status field is:

 

50 - Completed
99 - Cancelled

 

This should then display jobs with status of

10 - New
20 - Approved
30 - Scheduled
40 - In Progress

1 ACCEPTED SOLUTION

Accepted Solutions
Marktvc
Frequent Visitor

A work around I have found.

I created a caluclualted field in the sharepoint list called active. If status =

10 - New
20 - Approved
30 - Scheduled
40 - In Progress

Then I set the field to 1 else 0

Then using solution provided, tuned it to be filter where Active = 1

SortByColumns(Filter(Filter('Client Jobs',(Active="1")),StartsWith('Job Title',TextSearchBox1.Text)) ,"Title",If(SortDescending1,Descending,Ascending))

View solution in original post

7 REPLIES 7
PaulD1
Super User
Super User

You can try something like the following:

 

SortByColumns(Filter(Filter('Client Jobs', Not("Title" = "50 - Completed" Or "Title" = "99 - Cancelled"   )StartsWith(Title, TextSearchBox1.Text)),"Title" , If(SortDescending1, Descending, Ascending))

 

I.e. filter out code 50 and 99 first, then run your search filter against the result. This will likely give you a delegation warning, so only use if you expect to have fewer than 500 statuses.

Marktvc
Frequent Visitor

Close...

 

The field with status is called Status

 

So I have changed it to be

 

SortByColumns(Filter(Filter('Client Jobs', Not("Status" = "50 - Completed" Or "Title" = "99 - Cancelled" )StartsWith(Title, TextSearchBox1.Text)),"Title" , If(SortDescending1, Descending, Ascending))))

 

how ever still no luck.

Sorry - remove the double quotes around Status and Title within the Not(...) part of the formula.

Marktvc
Frequent Visitor

now is

 

SortByColumns(Filter(Filter('Client Jobs', Not(Status = "50 - Completed" Or "Title" = "99 - Cancelled")StartsWith(Title, TextSearchBox1.Text)),"Title" , If(SortDescending1, Descending, Ascending))))

 

came back woth lots of errors.

 

Result.jpg

Hi @Marktvc 

I think you're just missing the comma before the StartsWith. This might work a bit better.

 

SortByColumns(Filter(Filter('Client Jobs', Not(Status = "50 - Completed" Or Title = "99 - Cancelled")), 
StartsWith(Title, TextSearchBox1.Text)),
"Title" ,
If(SortDescending1, Descending, Ascending) )
Marktvc
Frequent Visitor

Improved

 

no have this error.  The field is a Drop down.  I noted this has some impact from other posts.

 

Result2.jpg

Marktvc
Frequent Visitor

A work around I have found.

I created a caluclualted field in the sharepoint list called active. If status =

10 - New
20 - Approved
30 - Scheduled
40 - In Progress

Then I set the field to 1 else 0

Then using solution provided, tuned it to be filter where Active = 1

SortByColumns(Filter(Filter('Client Jobs',(Active="1")),StartsWith('Job Title',TextSearchBox1.Text)) ,"Title",If(SortDescending1,Descending,Ascending))

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (3,430)