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

Adding a check box to the default browse gallery to filter empty cells.

I have a fairly simple list (Disposition Tracker) in SharePoint that I have created a power app to use for data entry & review of non-conforming manufacturing orders in a manufacturing plant. Operators submit the orders for review by the engineering department using one screen in the app, and the engineers use another screen to review and disposition each entry for "Ok", "Rework" or "Scrap". 

 

The default text search box in the browse gallery works fine to filter and sort (ascending/descending "DRDate") on the field "OrderNumber" as you type in data using this formula:

 

SortByColumns(Filter([@'Disposition Tracker'], StartsWith(OrderNumber, TextSearchBox1.Text)), "DRDate", If(SortDescending1, Descending, Ascending))

 

I would like to add an additional check box to filter out orders that have already been dispositioned (i.e., only show items if the field "Disposition" is blank).  A few questions:

 

  1. How should the formula above in the DATA Items be modified?
  2. For the check box, what should be in the OnCheck, OnUnchekc and OnSelect Action fields?
  3. How do I configure the checkbox to automatically reset to unchecked for each use?

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User III
Super User III

Try the following:

If(CheckBox1.Value=true,
SortByColumns(Filter([@'Disposition Tracker'], StartsWith(OrderNumber, TextSearchBox1.Text),Disposition<>Blank()), "DRDate", If(SortDescending1, Descending, Ascending)),

SortByColumns(Filter([@'Disposition Tracker'], StartsWith(OrderNumber, TextSearchBox1.Text)), "DRDate", If(SortDescending1, Descending, Ascending)))

 

You can try changing the <> to =

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Still did not work, but discovered that was because the "Disposition" field in the list was not text...it is a choice field. Modified the formula to:

 

If(CheckBox1.Value,
SortByColumns(Filter([@'Disposition Tracker'], StartsWith(OrderNumber, TextSearchBox1.Text),IsBlank(Disposition.Value)), "DRDate", If(SortDescending1, Descending, Ascending)),
SortByColumns(Filter([@'Disposition Tracker'], StartsWith(OrderNumber, TextSearchBox1.Text)), "DRDate", If(SortDescending1, Descending, Ascending)))

 

...works like a charm!

 

Thanks for your help!

View solution in original post

7 REPLIES 7
Super User III
Super User III

Try the following:

If(CheckBox1.Value=true,
SortByColumns(Filter([@'Disposition Tracker'], StartsWith(OrderNumber, TextSearchBox1.Text),Disposition<>Blank()), "DRDate", If(SortDescending1, Descending, Ascending)),

SortByColumns(Filter([@'Disposition Tracker'], StartsWith(OrderNumber, TextSearchBox1.Text)), "DRDate", If(SortDescending1, Descending, Ascending)))

 

You can try changing the <> to =

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

I tried both variations you offered, but am getting the error below:

 

kitpalmer_0-1592840786337.png

 

Have you inserted Checkbox1 on your screen?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Yes.

kitpalmer_0-1592844319697.png

 

If(CheckBox1.Value,
SortByColumns(Filter([@'Disposition Tracker'], StartsWith(OrderNumber, TextSearchBox1.Text),Disposition<>""), "DRDate", If(SortDescending1, Descending, Ascending)),

SortByColumns(Filter([@'Disposition Tracker'], StartsWith(OrderNumber, TextSearchBox1.Text)), "DRDate", If(SortDescending1, Descending, Ascending)))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

 

Just to check if the above formula worked for you after trying it.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Still did not work, but discovered that was because the "Disposition" field in the list was not text...it is a choice field. Modified the formula to:

 

If(CheckBox1.Value,
SortByColumns(Filter([@'Disposition Tracker'], StartsWith(OrderNumber, TextSearchBox1.Text),IsBlank(Disposition.Value)), "DRDate", If(SortDescending1, Descending, Ascending)),
SortByColumns(Filter([@'Disposition Tracker'], StartsWith(OrderNumber, TextSearchBox1.Text)), "DRDate", If(SortDescending1, Descending, Ascending)))

 

...works like a charm!

 

Thanks for your help!

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (9,444)