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:
Solved! Go to Solution.
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.
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!
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.
I tried both variations you offered, but am getting the error below:
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.
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!
User | Count |
---|---|
184 | |
124 | |
89 | |
45 | |
43 |
User | Count |
---|---|
262 | |
160 | |
128 | |
81 | |
75 |