web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / BrowseGallery, SQL Ser...
Power Apps
Answered

BrowseGallery, SQL Server and sorting

(0) ShareShare
ReportReport
Posted on by 10

Hi all!

 

I was searching this forum and also all over the internet but was not able to find an answer to a question that looks so straightforward.

 

I want to sort the entries coming from an SQL server connection by date in a BrowseGallery. I tried all ways I can think of (with quotes, single or double, with square brackets ...) to specify the parameters of Sort() in the Items field but with no luck. All I get is:

ClemensVienna_0-1643035317517.png

 

The message translates to: "Error: Unexpected characters. 'ParenClose' where 'Error' is expected"

The BrowseGallery does successfully show the items if I only set the Items field to linter_jobs, which is the name of the data source.

 

The project is a playground for testing and getting used to PowerApps but it is not very encouraging if something that should be easy is so hard to achieve?

 

Any help is much appreciated.

Clemens

Categories:
  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    What SQL data type is the Input_Date column?

  • ClemensVienna Profile Picture
    10 on at

    Hi! INPUT_DATE is a datetime (not nullable). But I also fail to try to sort by any other type like int or text 😟

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    If that is a DateTime column then it should work.  But make sure you use the column name provided by Intellisense.  It shouldn't require the square brackets.  This is working for me in one of my SQL tables with DateTime.

    image.png

  • ClemensVienna Profile Picture
    10 on at

    Thank you for helping me in this matter. Somehow I believe it has something to do with the way the data source is added to the project? Is this possible?

     

    I simply added the connection to the SQL Server by IP and using database authentication.

    ClemensVienna_0-1643037674134.png

     

  • Verified answer
    timl Profile Picture
    37,424 Super User 2026 Season 2 on at

    @ClemensVienna 

    As you appear to be running Power Apps in German, you'll need to separate the arguments in your call to Sort with semi-colons, rather than a comma.

    Sort(linter_jobs; [INPUT_DATE])

    After that, I'd take @Pstork1's advice about choosing the column name provided by Intellisense. 

  • ClemensVienna Profile Picture
    10 on at

    😲

     

    @timl @Pstork1 

     

    Thanks a lot to both of you! You were right @timl , this was the reason.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard