Hey so I have a sort icon that I want to be able to sort on a specific column.
This is the items property of the icon:
UpdateContext({SortInner:!SortInner})
This is the on visible property of the screen
UpdateContext({SortInner:Blank()})
This is the items property of the data table I'm trying to sort on with the failed formula
Search(Filter('[dbo].[970_item_format_item_mast]',If(!IsBlank(SortInner), SortByColumns('[dbo].[970_item_format_item_mast]','Inner Diameter', If(SortInner = true, Ascending,Descending)) &&
(part_name = Gallery4.Selected.PartName) &&
(outerdd.Selected.Result = 0 || outer_diameter = outerdd.Selected.Result) &&
(innerdd.Selected.Result = 0 || inner_diameter = innerdd.Selected.Result) &&
(cross_sectiondd.Selected.Result = 0 || cross_section = cross_sectiondd.Selected.Result) &&
(Heightdropd.Selected.Result = " - " || height = Heightdropd.Selected.Result) &&
(mat_compounddd.Selected.Result = " - " || material_compound = mat_compounddd.Selected.Result) &&
(mat_manufacturerdd.Selected.Result = " - " || material_manufacturer = mat_manufacturerdd.Selected.Result))
,'Part Number/Description Searchbox'.Text,"item_id","item_desc")
This is the items property of the data table without trying to add in what I thought would work for sorting
Search(Filter('[dbo].[970_item_format_item_mast]',
(part_name = Gallery4.Selected.PartName) &&
(outerdd.Selected.Result = 0 || outer_diameter = outerdd.Selected.Result) &&
(innerdd.Selected.Result = 0 || inner_diameter = innerdd.Selected.Result) &&
(cross_sectiondd.Selected.Result = 0 || cross_section = cross_sectiondd.Selected.Result) &&
(Heightdropd.Selected.Result = " - " || height = Heightdropd.Selected.Result) &&
(mat_compounddd.Selected.Result = " - " || material_compound = mat_compounddd.Selected.Result) &&
(mat_manufacturerdd.Selected.Result = " - " || material_manufacturer = mat_manufacturerdd.Selected.Result))
,'Part Number/Description Searchbox'.Text,"item_id","item_desc")
Solved! Go to Solution.
Can you try to update the expression to:
SortByColumns(Search(Filter('[dbo].[970_item_format_item_mast]',
(part_name = Gallery4.Selected.PartName) &&
(outerdd.Selected.Result = 0 || outer_diameter = outerdd.Selected.Result) &&
(innerdd.Selected.Result = 0 || inner_diameter = innerdd.Selected.Result) &&
(cross_sectiondd.Selected.Result = 0 || cross_section = cross_sectiondd.Selected.Result) &&
(Heightdropd.Selected.Result = " - " || height = Heightdropd.Selected.Result) &&
(mat_compounddd.Selected.Result = " - " || material_compound = mat_compounddd.Selected.Result) &&
(mat_manufacturerdd.Selected.Result = " - " || material_manufacturer = mat_manufacturerdd.Selected.Result))
,'Part Number/Description Searchbox'.Text,"item_id","item_desc"),'Inner Diameter', If(SortInner = true, Ascending,Descending))
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Can you try to update the expression to:
SortByColumns(Search(Filter('[dbo].[970_item_format_item_mast]',
(part_name = Gallery4.Selected.PartName) &&
(outerdd.Selected.Result = 0 || outer_diameter = outerdd.Selected.Result) &&
(innerdd.Selected.Result = 0 || inner_diameter = innerdd.Selected.Result) &&
(cross_sectiondd.Selected.Result = 0 || cross_section = cross_sectiondd.Selected.Result) &&
(Heightdropd.Selected.Result = " - " || height = Heightdropd.Selected.Result) &&
(mat_compounddd.Selected.Result = " - " || material_compound = mat_compounddd.Selected.Result) &&
(mat_manufacturerdd.Selected.Result = " - " || material_manufacturer = mat_manufacturerdd.Selected.Result))
,'Part Number/Description Searchbox'.Text,"item_id","item_desc"),'Inner Diameter', If(SortInner = true, Ascending,Descending))
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
That worked thank you!!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
169 | |
94 | |
64 | |
64 | |
60 |
User | Count |
---|---|
241 | |
163 | |
95 | |
85 | |
82 |