cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Impactful Individual
Impactful Individual

Sort Question

I have been tasked to update the sort for a gallery.

 

It is currently sorted by the modified date to show the most recently modified items first.    Each item has the name of a developer in it and I have been asked to sort like this:

 

  1. By Developer with the logged in developer's items shown first
  2. By Modified date, with the most recent to oldest

 

I have the second part, but am not sure how to implement the first part.    All items will be shown but the logged in Developer's items should be shown first from most recent to oldest.

 

Example:

 

Example:

 

Developers:

 

Bill Gates

Steve Jobs

Jeff Bezos

 

Currently logged in developer Jeff Bezos

 

Items:

 

Jeff Bezos 7/5/2020

Jeff Bezos 7/1/2020

Jeff Bezos 6/3/2020

Bill Gates 6/24/2020

Bill Gates 5/15/2020

Steve Jobs 7/2/2020

Steve Jobs 4/28/2020

Steve Jobs 4/2/2020

 

Currently logged in Developer Steve Jobs:

 

Steve Jobs 7/2/2020

Steve Jobs 4/28/2020

Steve Jobs 4/2/2020

Bill Gates 6/24/2020

Bill Gates 5/15/2020

Jeff Bezos 7/5/2020

Jeff Bezos 7/1/2020

Jeff Bezos 6/3/2020

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

OnStart of the App set a Variable:

Set(LoogedUser,User().FullName)

 

Create a Collection OnVisible of the Screen:

ClearCollect(MyCol,AddColumns(Datasource,"SortColumn",If(DeveloperColumn=LoogedUser,1,2)))

 

Filter the Gallery as:

SortByColumns(MyCol,"SortColumn","Date")

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

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

7 REPLIES 7
Super User III
Super User III

Additional information on your current formula would have helped.
But try:

SortByColumns( Datasource, "DeveloperColumn",  "DateColumn")

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

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.

Unfortunately that does not meet the criteria specified in my post.

 

I don't just need to sort by the developer, I need to sort by the developer so the currently logged in developer's items are at the top of the list and then sort by date.

 

Example:

 

Developers:

 

Bill Gates

Steve Jobs

Jeff Bezos

 

Currently logged in developer Jeff Bezos

 

Items:

 

Jeff Bezos 7/5/2020

Jeff Bezos 7/1/2020

Jeff Bezos 6/3/2020

Bill Gates 6/24/2020

Bill Gates 5/15/2020

Steve Jobs 7/2/2020

Steve Jobs 4/28/2020

Steve Jobs 4/2/2020

 

Currently logged in Developer Steve Jobs:

 

Steve Jobs 7/2/2020

Steve Jobs 4/28/2020

Steve Jobs 4/2/2020

Bill Gates 6/24/2020

Bill Gates 5/15/2020

Jeff Bezos 7/5/2020

Jeff Bezos 7/1/2020

Jeff Bezos 6/3/2020

 

 

 

 

 

 

 

 

 

OnStart of the App set a Variable:

Set(LoogedUser,User().FullName)

 

Create a Collection OnVisible of the Screen:

ClearCollect(MyCol,AddColumns(Datasource,"SortColumn",If(DeveloperColumn=LoogedUser,1,2)))

 

Filter the Gallery as:

SortByColumns(MyCol,"SortColumn","Date")

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

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

Please is the issue resolved

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

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 haven't tried it yet.   Our records that we are working with have been migrated from SharePoint 2013 and the creators are shown as:

 

Last Name, First Name and not First Name Last Name.

 

I will have to use the Office365Users connector.   I will try it shortly

Thanks, I am sure this works, but I am using a gallery with forms and would have to redo my entire app for this.   I will figure something else out.

Can you mark the solution as resolved

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

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.

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (7,366)