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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Invalid Expression

(0) ShareShare
ReportReport
Posted on by 12

I would like to set up a flow where users will receive an email when an expiration or due date is 30 days or less away. The dates are in a Sharepoint list. I found a build that stated it would accomplish my goal. However, I get the following error:

 

The expression "Due Date le 'addDays(utcNow(), variables('varNumDays'), 'yyyy-MM-dd')'" is not valid. Creating query failed.

 

I tried changing "Due Date" to "DueDate" and "le" to "eq". None of this works. The column on my SharePoint list is titled "Due Date".

 

Here is the flow:

nomad187_0-1633371102296.png

 

If any more info is needed to help solve this, please let me know.

 

Thanks

Categories:
I have the same question (0)
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @nomad187 

     

    Both of your expressions are showing as strings, they should appear as dynamic blocks.  Just cut the expression and paste it into the expression builder and try again.

     

    Damien

  • Verified answer
    ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @nomad187 

    I agree with @DamoBird365  but want to add that using Due Date won't work - you need to use the columns internal name and internal names have no spaces.  It is most likely DueDate.  To verify, go to list settings and click on the column name.  The internal name will be at the end of the URL after field= .

     

     

  • nomad187 Profile Picture
    12 on at

    @DamoBird365 and @ScottShearer 

     

    The first expression did indeed cause the error. I did as you suggested and cut/paste it into the expression builder.

     

    The second issue was the internal name was OrderNumber. Once I changed Due Date to that, it worked correctly.

     

    Thanks for the help!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard