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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,916)