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 / Issue Referencing Shar...
Power Apps
Suggested Answer

Issue Referencing SharePoint Date Column ReqDeadline in SortByColumns

(1) ShareShare
ReportReport
Posted on by 62

Hi everyone,

I'm currently working on a gallery that pulls data from a SharePoint list. The goal is to sort the gallery items so that blank values in the ReqDeadline column are shown first, followed by the rest of the records sorted in descending order by the ReqDeadline date.

Current code:

SortByColumns(
    Filter(
        'SharePoint List',
        // Conditional Plant Filtering 
        If(
            Left(gblUserNickname, 2) = "hu",
            Plant = 371,
            If(Left(gblUserNickname, 2) = "mx", Plant = 372, true)
        ),
        /* Status Filtering */
        (IsBlank(Status_Dropdown_4.Selected.Value) || Status in Status_Dropdown_4.SelectedItems.Value),
        /* EquipID Filtering */
        (IsBlank(EquipID_dropdown.Selected.Value) || EquipmentID in EquipID_dropdown.SelectedItems.Value),
        /* Created Date Filtering (Date) */
        (IsBlank(DatePickerSlicer.SelectedDate) || CreatedDate = DatePickerSlicer.SelectedDate),
        /* Planner Filtering */
        (IsBlank(Planner_Combobox1_1.Selected.Value) || PlannerName in Planner_Combobox1_1.SelectedItems.Value),
        /* Exclude Closed ProgressStatus */
        ProgressStatus <> "Closed",
        /* Exclude Status ending with 0 */
        !EndsWith(Status, "0")
    ),
    // Sort by calculated value: blank ReqDeadline = "01/01/3000", then by ReqDeadline descending
    If(IsBlank(ReqDeadline), DateValue("01/01/3000"), ReqDeadline), SortOrder.Ascending
)
 

The Goal:

  • Display the records in the gallery where the ReqDeadline column is blank first.
  • After the blank records, show the remaining records sorted in descending order by the ReqDeadline column.

The Issue:

The formula works correctly with the other columns, but PowerApps doesn't recognize the ReqDeadline column. When I try to reference it (e.g., IsBlank(ReqDeadline) or ReqDeadline directly), I get errors saying that the column is either not valid or it expects a text value, but the column in SharePoint is of type Date.

I've checked that ReqDeadline is the correct display name for the column in SharePoint.

Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,963 Moderator on at
    HI
     
    You don't want the display name you want the real name.
     
    Go to the List. Click the Cog (top right) go to List Settings.
     
    Click that column name. When the details page loads for that field, look at the END of the URL (yes the url).
     
    Thats the name you want and need to use.
  • PolarMare Profile Picture
    62 on at
    Hey @FLMike, the name of the column is the same, I checked the URL

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 432

#2
Valantis Profile Picture

Valantis 362

#3
timl Profile Picture

timl 337 Super User 2026 Season 1

Last 30 days Overall leaderboard