cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Techgallagher
Helper I
Helper I

Sort Icon

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")
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Techgallagher 

 

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!

View solution in original post

2 REPLIES 2

Hi @Techgallagher 

 

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!!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,456)