Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

SharePoint List Approval Workflow

Posted on by 14
Hello, all--
 
I am relatively inexperienced with Power Automate and coding, so apologize for perhaps some ignorant questions.  I've created a SharePoint approval workflow using the standard "Request approval (everyone must approve" for a selected item", with some slight modifications.  I've run into a couple of items that I'm hoping can be corrected and, if so, could use some help.
  1.  There is a Select Data Operation that creates a table of Approver, Comments, and Response.  I have added Date to this table.  I just approved a request at 10:43 a.m. EST, yet the time that is recorded as a result of the Condition step is 15:43.  Is there a way to change this?  I'm assuming this is a time zone setting.
  2.  I have added an "Apply to each" step at the end to record the responses in a Sign-off Status field in the SharePoint Item.  What I'm noticing is that it only records the last response by an individual.  I would like for this to record every response by an individual.  So, for example, if I reject a request 3 times and then approve the 4th, I would like all 4 to be recorded with responses and date of each.  Is there a way to do this that isn't terribly complicated? 
  • KB-20091245-0 Profile Picture
    KB-20091245-0 14 on at
    SharePoint List Approval Workflow
    This worked perfect; thank you so much for your help!
  • Expiscornovus Profile Picture
    Expiscornovus 30,706 on at
    SharePoint List Approval Workflow
    Sorry, it looks like there was a small typo in the code snippet I shared earlier, my bad 😅. The first single quote before the body was missing.
     
    Try this instead:
    convertTimeZone(outputs('Wait_for_an_approval')?['body/completionDate'], 'UTC', 'Eastern Standard Time')
     
    Test result
     
  • KB-20091245-0 Profile Picture
    KB-20091245-0 14 on at
    SharePoint List Approval Workflow
    Unfortunately, I'm receiving the same error.
  • Expiscornovus Profile Picture
    Expiscornovus 30,706 on at
    SharePoint List Approval Workflow
    Can you remove the single quotes around the completionDate field reference and try again?
    convertTimeZone(outputs('Wait_for_an_approval')?[body/completionDate'], 'UTC', Eastern Standard Time')
     
  • KB-20091245-0 Profile Picture
    KB-20091245-0 14 on at
    SharePoint List Approval Workflow
    Thank you, Expiscornovus.  Where would I place this expression?  I assumed I would place it where the Completion Date variable is being populated.
     
    Added, the expression below seems to convert the static date and time included.  I'm hoping to convert the Completion Date variable to UTC -05:00 (Eastern Time Zone)--as well as formatting the date and time.  What should I change '2024-11-18T15:43:30Z' in the formula to?  I tried to swap it out with the Completion date variable thinking that it would convert the captured date and time, but I get a message that the expression is invalid.
     
    The invalid expression now reads convertTimeZone('outputs('Wait_for_an_approval')?[body/completionDate']', 'UTC', Eastern Standard Time').
     
  • Expiscornovus Profile Picture
    Expiscornovus 30,706 on at
    SharePoint List Approval Workflow
    I assume your time zone is UTC -05:00 (Eastern Time Zone)?
     
    If that is the case you can use the below expression:
    convertTimeZone('2024-11-18T15:43:30Z', 'UTC', 'Eastern Standard Time')

     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard