cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sriks
Frequent Visitor

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 II
Super User II

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 II
Super User II

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

Sriks
Frequent Visitor

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 User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (66,442)