cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sriks
Advocate I
Advocate I

SortByColumns, specified column does not exists

Hello, I am using the SortByColumns function inside the "items" field of a gallery to sort my gallery by date (gallery created from a sharepoint list).

I got two date variables, same format (created using another app and putting same data in two variables whith Patch, 'Delai' and 'Delai_nouv').

 

Problem here is that :

SortByColumns('Informations demandes', "Delai", If(SortDescending1, Descending, Ascending))

is working, and that :

SortByColumns('Informations demandes', "Delai_nouv", If(SortDescending1, Descending, Ascending))

is creating the error :

The specified column 'Delai_nouv' does not exist.

whereas inside my gallery, ThisItem.Delai_nouv is working while using the same connexion to my sharepoint list.

 

I tried updating my list using View -> Data Sources.

I also tried deleting the connexion and recreating it.

 

I hope someone got a workaround cause i don't want to recreate my app from scratch.

Thanks in advance !

1 ACCEPTED SOLUTION

Accepted Solutions
iAm_ManCat
Super User
Super User

Hi,

 

This might be an issue to do with renaming the column as SortByColumn uses 'base' column names:

If you open the SharePoint List

> 'Cog' Settings

> List Settings

> Click on that Column to edit its properties

 - now in the Titlebar you will see something like this:

image.png

 

This will list the 'base' field name that the field was called before it was renamed - this is what is needed when using SharePoint column names surrounded by " "

 

Please could you try using this and let me know if this works,

 

Cheers,

ManCat

 

@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


View solution in original post

3 REPLIES 3
iAm_ManCat
Super User
Super User

Hi,

 

This might be an issue to do with renaming the column as SortByColumn uses 'base' column names:

If you open the SharePoint List

> 'Cog' Settings

> List Settings

> Click on that Column to edit its properties

 - now in the Titlebar you will see something like this:

image.png

 

This will list the 'base' field name that the field was called before it was renamed - this is what is needed when using SharePoint column names surrounded by " "

 

Please could you try using this and let me know if this works,

 

Cheers,

ManCat

 

@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


Thank you for answering.

It was indeed the original field name that was still saved somewhere.

I successfully renamed it going to the list parameters and editing the column parameters there. 

I now can call the column by the modified name.

 

It's still strange that editing the title of a column inside of the list isn't doing the same thing as editing it inside the list parameters..

 

Thanks,

Sriks

Hi,

 

Yes it's a 'SharePoint quirk' - I've written about it in more detail here:

https://powerusers.microsoft.com/t5/General-Discussion/Field-name-size-limit/m-p/57728/thread-id/238...

 

Cheers,

ManCat

@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


Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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