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 / Automate Columns in Sh...
Power Automate
Answered

Automate Columns in Sharepoint list

(0) ShareShare
ReportReport
Posted on by 997 Super User 2024 Season 1

Hi,

anonymous21_1-1652342604564.pngthis is my Leave Request list

 

 

anonymous21_0-1652342042858.pngthis is my Employee list

Both Approval Type are choice fields,


In my Leave Request list there are 2 columns; Requester and Approval type that are corresponding with the Employee list; Name and Approval Type. I manually input the Name and Approval Type in the Employee list. 

 

Then, after the user has created an item in the Leave Request list, I want the flow to check the Requester name that matches the Name in the Employee list to automate the Approval Type. How to do that by integrating with Power Apps or using Power Automate?

 

@Pstork1 @WarrenBelz @yashag2255 @vivekpande18 @martinav @DamoBird365 @Expiscornovus @ScottShearer @VJR 

@Adrian_Celis @timl @BCLS776 @RezaDorrani 

Thank you.

Categories:
I have the same question (0)
  • Verified answer
    vivekpande18 Profile Picture
    894 Super User 2024 Season 1 on at

    Hi @syhrh,

     

    If you want to update the Approval Type column after the request is created in Leave Request List, you can use Power Automate.

    Please find below the steps:

    Create flow on your Leave Request List

    1- Trigger: When an  item is created (SharePoint)

    vivekpande18_0-1652337372137.png

     

    2- Store the Requester Email in the variable.

    vivekpande18_2-1652337459452.png

     

    3- Initialize variable to store Approval Type value from Employee list.

    vivekpande18_3-1652337527478.png

     

    3- Use the Get Items action to fetch the data from Employee List based on Requester name

    vivekpande18_4-1652337555354.png

    Filter Query : Name/EMail eq '@{variables('Requester Email')}'

     

    4 - Store the value of Approval Type in variable

    vivekpande18_5-1652337616629.png

     

    5- Update back the value in Leave Request List

    vivekpande18_6-1652337666544.png

     

    Site Address: Select the Site URL in which we want to perform actions

    Method: PATCH

    Uri: _api/web/lists/getbytitle('Your List Name')/items(itemID) 

    Headers

      {
          "content-type": "application/json;odata=verbose",
          "IF-MATCH": "*"
    }

    Body : RequestBody

         {
             "__metadata": {
                   "type": "SP.Data.Your List NameListItem"
            },
           "Column Internal Name": "@{variables('Approval Type')}",
       }

     

     

    Thanks,

    vivek

     

    If this post helps answer your question, please click on "Accept as Solution" to help other members find it more quicky.

    If you thought this post was helpful, Please give it a thumbs up.

  • syhrh Profile Picture
    997 Super User 2024 Season 1 on at

    Hi @vivekpande18, I followed your flow and receive no errors and it's stated that the flow ran successfully but the Approval Type in Leave Request isn't automated.

     

  • vivekpande18 Profile Picture
    894 Super User 2024 Season 1 on at

    Hi @syhrh , 

     

    What is the type of colum  the Approval Type is in both the lists? 

     

    Thanks, 

    Vivek

  • syhrh Profile Picture
    997 Super User 2024 Season 1 on at

    Hi @vivekpande18 both are choice fields.

  • vivekpande18 Profile Picture
    894 Super User 2024 Season 1 on at

    Hi @syhrh , 

    Can you confirm, if it's a single choice or multi choice fields in both the list.

     Make sure you have the  same choice values in both the lists. 

     

     

     

    Thanks for tolerating my questions in bits and pieces

     

  • syhrh Profile Picture
    997 Super User 2024 Season 1 on at

    Hi @vivekpande18, it's a single choice field in both lists

  • vivekpande18 Profile Picture
    894 Super User 2024 Season 1 on at

    Hi @syhrh ,

     

    Above code works fine with single choice column. Below could be the possible reason for not updating the values

     

    1- Check the internal name of the choice column, it should be same as you mentioned in Http action.

    2- Choice column values should be same in both the lists. (Employee & Leave Requests)

    3- Can you check the output of the step-4 (mentioned above) in your flow, is it outputting correct value.

     

    Verify above points in your flow.

     

    Thanks.

    Vivek

  • syhrh Profile Picture
    997 Super User 2024 Season 1 on at

    Hi @vivekpande18 I've deleted the column Approval Type and recreated it then it works. Thank you for your help! I really appreciate it.

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 60 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 54

#3
Expiscornovus Profile Picture

Expiscornovus 47 Most Valuable Professional

Last 30 days Overall leaderboard