cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Sortbycolumn not working

Can someone guide me on this. i got a dropdown menu that i want to set the items.

It supposed to drop down the list based on department, i;ve tried department.value. 'Department' or "Department" but its not retrieving the data from the sharepoint list. Captured below are my screenshots. It works fine if i use SortByColumns('Leslie New Sharepoint List',"Full_x0020_Name")

Department.jpg

Department sortbycolumns.jpgTemp table.jpg

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Sortbycolumn not working

Hi @nchandran ,

Try this

SortByColumns(
   AddColumns(
      ’Leslie New Sharepoint List’,
      "DeptSort",
      Department.Value
   ),
   "DeptSort"
 )

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Highlighted
Helper III
Helper III

Re: Sortbycolumn not working

Hi,

I found out that i had to change the properties value to Deptsort inorder to see the results. Thank you soo much!!!

I got this working but there are mutiple duplicates, so i've decided to add a distinct feature on it. Works great.

Distinct(SortByColumns(AddColumns('Leslie New Sharepoint List',"DeptSort",Department.Value),"DeptSort"),DeptSort)

View solution in original post

9 REPLIES 9
Highlighted
Community Champion
Community Champion

Re: Sortbycolumn not working

Hi @nchandran ,

Try this

SortByColumns(
   AddColumns(
      ’Leslie New Sharepoint List’,
      "DeptSort",
      Department.Value
   ),
   "DeptSort"
 )

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Highlighted
Helper III
Helper III

Re: Sortbycolumn not working

hi,

 

its not working,

suggestion not working.jpg

Highlighted
Super User
Super User

Re: Sortbycolumn not working

Hi @nchandran 

 

In SharePoint, could you please click on your Cog (top-right), then choose list settings,

image.png

 

then scroll down until you see the column name and click on it

 

image.png

 

 

now, inside your address bar you will see at the end the name of the column as SharePoint sees it - this is what we use when we reference SharePoint columns using " " which is what SortByColumns requires:

 

image.png

 

 

Could you try using that name after &Field= in your SortByColumns quotes " " and let me know if that works?

 

Thanks,

Sancho


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Highlighted
Helper III
Helper III

Re: Sortbycolumn not working

this is the screenshot of the sharepoint column which im targetting.

 

department.jpg

Highlighted
Community Champion
Community Champion

Re: Sortbycolumn not working

@nchandran ,

You have put Filter in front of it - it does not need this.

Highlighted
Helper III
Helper III

Re: Sortbycolumn not working

ok i've removed filter but the dropdown is not working.department pull down empty.jpg

Highlighted
Community Champion
Community Champion

Re: Sortbycolumn not working

Hi @nchandran ,

My code is a complete workaround as you cannot sort by a Choice field. I got the code you have working, but needed to save it and come back for it to update.

If you really need SortByColumns (to reference other fields directly rather than by Lookup), I think this is the only option.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Highlighted
Community Champion
Community Champion

Re: Sortbycolumn not working

Hi @nchandran ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Helper III
Helper III

Re: Sortbycolumn not working

Hi,

I found out that i had to change the properties value to Deptsort inorder to see the results. Thank you soo much!!!

I got this working but there are mutiple duplicates, so i've decided to add a distinct feature on it. Works great.

Distinct(SortByColumns(AddColumns('Leslie New Sharepoint List',"DeptSort",Department.Value),"DeptSort"),DeptSort)

View solution in original post

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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