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 figures on anot...
Power Automate
Answered

Update figures on another sharepoint list

(0) ShareShare
ReportReport
Posted on by 33

I m newbies to Mflow. Appreciate if anyone could support and provide an answer to this. Thanks a million! 

I am trying to set a workflow which the trigger action is to apply an additional comp. leave number (Comp. Leave Addition) which will then update figure in the field of another sharepoint list (Leave Entitlement).

Example - when I add new in the comp. leave addition list (say 3 comp leave days), the figure 3 will be added to the leave entitlement list accordingly in the compensation leave entitled field. And, of course, this action has to accumulates as it runs on. 

 

Comp. Leave Addition.PNG

Leave Entitlement.PNG

However, I got stuck as I set the action "Update Item". I struggled to build an expression like "add(comp. leave addition, comp. leave entitlement)". (1) I cannot locate comp. leave entitlement as a dynamic content, (2) I also unsure how the flow and the expressions should be set. 

 

flow.PNG

 

Much appreciate if anyone could assist. Thanks! 

 

 

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Oscar_Wan 

     

    You are putting the expression in the wrong place to start with. In the Update Item 2, reove everything from the Compensation Leave Entitled column and and put the cursor into it. You will see the dynamic selector and over there go to expression editor. Here type add() and within the bracket select the two fields from the dynamic selector and separate them with a comma ','. 

     

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Oscar_Wan Profile Picture
    33 on at

    Thanks Yashag for your reply. 

    I attempted that before, however, the compensation leave entitled dynamic content was not one of the selections when I was in the add expression. 

    I mean there is only the comp. leave addition dynamic content but I cannot locate the compensation leave entitled dynamic content. Therefore, I cannot actually establish the add expression properly. Appreciate your further assistances. 

    flow2.PNG

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Oscar_Wan 

     

    Yes. What you can do is, initilise two variables in the beginning of the flow. These variables should be of type integer. 

    In the apply to each action, before the update item, add the action set variable and here in the value choose one field that you want to add and another set variable action and this is for the second variable you initialised and the value will be the second field that youwant to add. 

     

    On the update item, now type the add() and select the variables from the dynamic selector. 

     

    I am assuming that the column datatype of the fields that you are adding is integer in SP list. 

     

    Hope this Helps!

     

  • Oscar_Wan Profile Picture
    33 on at

    Yashag,

     

    I am not sure if I got you right, but both the variables (comp. leave addition) and (compensation leave entitled) were in integers in the first place. With that said, do I still need to add the action - "set as variable" before "apply to each"?

    Sorry I am new to all these syntax and flow things that I might not understand you fully.

    Integer 1.PNG

     

    Integer2.PNG

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    HI @Oscar_Wan 

     

    Yes. So the intiialise variable part the value needs to be left empty. The set variable action is eing used to get the value from the column and then we are adding it up. Please note that since we are using apply to each and iterating over multiple item, the set variable action will keep updating the value accordingly for every iteration. 

     

    Hope this Helps!

  • Oscar_Wan Profile Picture
    33 on at

    Yashag,

    I have attempted to follow your instructions as well. Yet, I still could not locate the dynamic content - compensation leave entitled inside the add expression. Appreciate your further explanations. 

    set variable.PNG

    fomular 2.PNG

     

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Oscar_Wan 

     

    Did you intialise the variables at the top? You have to give a name to the variables and in the set variable action select the variable in the Name part. I see that the set variable actions do not have name and they are not referencing anwheyre which is why you are unable to see them in the dynamic selector

  • Oscar_Wan Profile Picture
    33 on at

    Would you mind explain a bit more on how to initialize? Is this an action has to be added before the "set variable" function? 

     

    Also the "name" field in the "set variable" is blank, I have nothing to select in that field.

  • Oscar_Wan Profile Picture
    33 on at

    Yashag,

    I think I got what you meant by intialize at the top. But I don't know how to set this right. 

    The trigger starts by the action adding a new item on the comp. leave addition. 

    Then, in order to get the figure from the other SP list, I used "get item". 

    Then, I attempt to initialize variable. But how can I set to initialize the figure in comp. leave addition and compensatin leave entitled in particular?

    In the initialize variable function, what I have to set for name and the value? Thanks! 

     

    Initialize varibles.png

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Oscar_Wan 

     

    First- you have to initialise two variables. Name the first one as Var1 and second as Var2. Leave the values empty. 

     

    In the get items and apply to each loop just before the update item action create 2 set variable actions and in the name select var1 in the first set variable action and the value here will be the first field you want to add. 

     

    Similarly in the second set variable, select the var2 in the name and the value will be the second field you want to add 

     

    Choose the fields from the dynamic selector for the set variables. and then in the update item do the addition and choose the variables from dynamic selector.

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
Haque Profile Picture

Haque 304

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 243 Most Valuable Professional

Last 30 days Overall leaderboard