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 / Update single item fro...
Power Automate
Answered

Update single item from Sharepoint list /w PVA

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello dear community! I have posted the same message to the Building flows board but unfortunately no one has responded so i will try my luck here 🙂

Im struggling with building my first PVA bot for my employees and i have one problem with Update item. 
I want to do following thing: one specific user (i know how to make it) could edit Vacation Days in sharepoint list with help of PVA after vacation approval was successfuly done. 

My sharepoint looks like this: Screenshot_29.png

VacDays_1.01 - the amount of days that an employee has at the beggining of the year
VacDaysUsed - the amount of days that have been consumed during the year

VacDaysLeft - the amount of days that an employee has left (this column has been calculated through subtraction of first 2 columns)

And here how bot is supposed to work:

Bot: Please, enter the name of Employee. 
User: John Johnson

Bot: Please enter the number of days that have been taken for last Vacation approval

User: 10
Bot: Thanks, the amount of days left is now set to (X-10).

So...in power automate i have tried so many things, but none of them worked out. I have tried to Get items and then Update them but everytime i had some problems, maybe because i dont know how exactly i need to configurate this. So basically i need that amount of days that have been used in recent vacation approval would reduce the number of VacDays_1.01 by user input (10 in my case) and increase of VacDaysUsed by user choice (well also 10).

Would be very grateful if someone could explain to me at least how Update thing should be configurated, every other thing i will achieve by myself 🙂 

Categories:
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @Anonymous 

     

    Have you explored the add or sub expression?

     

    add(10,5) OR sub (10,5)

     

    Please note if the value is returned as a string from sharepoint, you will need to use int(). 

    e.g.

    int(('Get_item')?['body/VacDays_1.01']) //albeit you need to check the correct expression for your field.

     

     

    DamoBird365_1-1616768599695.png

     

     

    DamoBird365_0-1616768584703.png

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the tipp, yes, i have already explored this one, but the thing is i cant understand how can i express User°s input (on the screenshot) as variable for the subtraction? In my case its DaysUsedREC (recently)

    SpaceNudeln_0-1616770166634.png

    How should it be then?

    sub(int(('Get_item')?['body/VacDays_1.01']),int(DaysUsedREC)) ?
    My column from Sharepoint is a Number (not a string)

     

  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @Anonymous 

     

    You can build it up using the expression builder, type int() and then select the dynamic content tab and you should be able to select the DaysUsedREC value.  Alternatively, you can temporarily add the input to a compose or similar and hover over the dynamic value for the expression like so.

    DamoBird365_1-1616770652897.png

    triggerBody()['number']

     

    e.g. int(triggerBody()['number'])

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 423

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 177

Last 30 days Overall leaderboard