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 Automate / Having trouble buildin...
Power Automate
Unanswered

Having trouble building an odata query using addDays from a sharepoint column

(0) ShareShare
ReportReport
Posted on by

Hi All

 

New to this forum and new to Power Automate. I am trying to build an OData query using data stored in SharePoint list. The expression looks like this- 

addDays(utcNow(),int('EmailAlertDays'),'yyyy-MM-dd')
 
Here EmailAlertdays is a number field from a SharePoint list. Expression builder is telling me that this expression is invalid. 
 
Any ideas? 
Categories:
I have the same question (0)
  • Ramspevi Profile Picture
    110 on at

    Hello 

     

    please consider this as solution if your EmailAlertDays is already a number field. 

     

    addDays(utcNow(),outputs('Get_item')?['body/EmailAlertDays'],'yyyy-MM-dd')

     If it is text but you are 100% sure there are only numbers coming in consider this as solution:

    addDays(utcNow(),int(outputs('Get_item')?['body/EmailAlertDays']),'yyyy-MM-dd')



    In your example you are trying to format the string of text 'EmailAlertDays' to an integer which is impossible. 

    Hope this helps

  • v-LilyW-msft Profile Picture
    Microsoft Employee on at

    Hi @hss0827 

    Has your problem been solved?

    Do you want to filter out items that meet certain condition from sharepoint list? Could you please share a bit more about your scenario?

    I set up a simple flow, you can refer to below screenshots to see if it helps.

    This is my test list, I will filter out items that Date is less or equal to current UTC time plus 'EmailAlertDays‘ days.

    vLilyWmsft_1-1642559618492.png

    vLilyWmsft_0-1642559566521.png

    Expression:

    addDays(utcNow(),int(item()?['EmailAlertDays']),'yyyy-MM-dd')

    vLilyWmsft_2-1642560291721.png

     

    If you problem has been solved by Ramspevi , please accept Ramspevi's answer as Solution.

    Best Regards.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 641

#2
Vish WR Profile Picture

Vish WR 640

#3
Haque Profile Picture

Haque 495

Last 30 days Overall leaderboard