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 Apps
Unanswered

Date Sorting Issue

(0) ShareShare
ReportReport
Posted on by 57

I'm trying to use Sort and / or SortbyColumn to sort a gallery coming from a SQL backend.  Very strange.  When I sort by the date column, I cannot show that columns value in any text box, it comes up blank.  I can show other date fields from the row though.  Any ideas?

 

(Update)

 

Its very strange behavior, as long as I am doing a sort by the column I cannot access that date column.  Even if I do a  lookup in a text box on a gallery item it will not return anything 

 

LookUp('[dbo].[CAL]', recid = "CQ7V4JJ$IN#VDKA", ONDATE)*
*(Recid is the unique key field, I tried both recid = thisitem.recid and the literal example above).

Categories:
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi WAstarita,

     

    How did you configure the Sort/SortByColumns function?
    According to your description, the function worked and can show other date fields from the row, how were these date fields created? Were these fields similar with the date column that cannot show value in TextBox?

     

    Articles below could be a reference for you:
    1.Sort and SortByColumns function in PowerApps
    https://powerapps.microsoft.com/en-us/tutorials/function-sort/
    2. Filter, Search, and LookUp functions in PowerApps
    https://powerapps.microsoft.com/en-us/tutorials/function-filter-lookup/
    3.”Search and sort the gallery” section in this article about Understanding data forms in Microsoft PowerApps    
    https://powerapps.microsoft.com/en-us/tutorials/working-with-forms/


    Best regards,
    Mabel Mao

  • rgruian Profile Picture
    Microsoft Employee on at

     

    Have you tried specifying Ascending or Descending? This should help ensure that you are not unknowingly seeing rows that really do have those fields blank.

     

    Also, how are you making use of those fields? Have you tried piping their value(s) into Textboxes using the Text function in conjunction with a specific format? For example:

     

        = Text(ONDATE, "mm/dd/yyyy hh:mm:ss a/p")

     

    Also, how large is your data source? If there are lots of rows, you may be running into the 500-row limitation in PowerApps, whereby most of the queries are performed locally on a local cache of the data that is capped to 500 rows. And in that case, the local LookUp() operation, for example, may not find anything in that 500-row cache, which would explain why you get a blank result.

     

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 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard