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 Platform Community / Forums / Power Automate / error in leave request...
Power Automate
Unanswered

error in leave request test flow

(0) ShareShare
ReportReport
Posted on by 6

Hello everyone.

I am trying to create a Leave request flow based on the instructions that I found in a tutorial . (https://www.spguides.com/leave-request-approval-flow/)

 

I have managed to build the flow and I am in the process of testing it.

In the middle of the flow I am getting the attached error.


I am new at this and any help would be appreciated.

I understand that there is , probably, a step that I must include and has to do with how the date is handled.

 

Any ideas?

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,194 Most Valuable Professional on at

    Hi @nsan,

     

    The error suggests that the format of your start date value is not correct. The dayofweek function expects a format like yyyy-MM-ddTHH:mm:ss.fffffffK

     

    Just to double check. Is your StartDate field in the SharePoint list also a date/time type of field?

     

    Can you also share/double check what the format of the value was for this error in this specific flow run, you can check this in the outputs of the When a new item is created trigger action.

  • nsan Profile Picture
    6 on at

    Hello Expiscornovus

     

    Thank you very much.

    Here is how the Start Date and End date looks like in the sharepoint list

    nsan_0-1709033025095.png

    The StartDate variable is declared like this in the flow

    nsan_1-1709033172462.png

    so I assume that this is where the correct function must be used

  • Verified answer
    Expiscornovus Profile Picture
    33,194 Most Valuable Professional on at

    Hi @nsan,

     

    Yes, that is the correct location. However, it looks like you have added the expression as plain text. Can you add it via the expression tab?

     

    Try the below

    triggerOutputs()['body/StartDate']

     

    expression_tab_ini.png

  • nsan Profile Picture
    6 on at

    Hello Expiscornovus

     

    Thank you very much for the tip. Worked just fine.

    I am facing another error now in my flow.

    I get the attached error.

    I think that it has to do with the formulas at the Details field

    nsan_0-1709128581616.png

    These formulas are initialized in the flow like this

    nsan_1-1709128794109.png

     

    Any ideas would be much appreciated

     

     

  • Expiscornovus Profile Picture
    33,194 Most Valuable Professional on at

    Hi @nsan,

     

    It looks like you have added the expression for the End Date variable value also as plain text. Can you also add that addDays expression via the expression tab?

  • nsan Profile Picture
    6 on at

    I proceeded with the update in the EndDate variable via the expression tab.

    This is the content that I wrote as expression in the EndDate variable

    addDays(triggerOutputs()?['body/EndDate'],1)
     
    Re-tested but still getting the same error as before.
    Is the expression correct? Should I change something there?

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard