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 / Date order..... if the...
Power Apps
Answered

Date order..... if the field is empty, it is not displayed after sorting

(0) ShareShare
ReportReport
Posted on by 313

Hi,

Date order, if the field is empty, it is not displayed after sorting. I would like the empty fields to be at the beginning of the column in Data Table.

 

This 'onselect on icon 'Set(sort_var,"In_Date");UpdateContext({SortDescending1: !SortDescending1})

BiTry_0-1669898849020.png

This 'item in Data Table 'SortByColumns(Filter('OF',nev_keres_input_text.Text in Név), sort_var, If( SortDescending1, Descending, Ascending ) )

 

Thank you in advance for your help...

 

 

Categories:
  • Verified answer
    v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @BiTry 

     

    Do you want to put the record with empty date column in the first row of the table?
    I think the only way is to store the sorted items (Null record at the top) to the new collection, then display it in the table.

    You can try to put the following codes to OnSelect of the Sort button, when click it, it will create a new collection that sorts as your expectation.

     

    Set(
     sort_var,
     "Date"
    );
    UpdateContext({SortDescending1: !SortDescending1});
    ClearCollect(
     myGalleryCollection,
     Filter(
     '1117',
     Date = Blank()
     )
    );
    Collect(
     myGalleryCollection,
     SortByColumns(
     Filter(
     '1117',
     Date <> Blank()
     ),
     sort_var,
     If(
     SortDescending1,
     Descending,
     Ascending
     )
     )

     

    I have made a test for your reference:

    vliweimsft_0-1669948622790.png

    vliweimsft_1-1669948633098.png

     

     

    Best Regards,

    Levi

     

     

  • BiTry Profile Picture
    313 on at

    THX! Work:)

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard