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 / Power Automate and two...
Power Automate
Answered

Power Automate and two SharePoint online lists

(0) ShareShare
ReportReport
Posted on by

I am fairly new to SharePoint online and Power Automate and looking for a solution to do the following:

I have two lists

  • List 1: Budget name, Expense Code, Allowance and Total Budget available.
  • List 2: Item Name, Amount, Expense Code

I'm looking at a way for list one to be updated, with the value from amount on List 2 subtracted based on the expense code used.

For example:

If I input one laptop at £200 using expense code EA4 then List one will update to have that amount removed from the budget name & amount and figure populated in total budget available.

Any suggestions or guidance as I've been looking but can't seem to figure it out or find a way.

Categories:
I have the same question (0)
  • v-LilyW-msft Profile Picture
    on at

    Hi @Anonymous 

    Do you want to remove the value of Budget name and fill Total Budget available with the value that Budget name subtract Amount in list2 when list2 update?

    If any misunderstanding, please kindly let me know.

    I simply created a Flow, you can refer to as below:

    This is my list1

    vLilyWmsft_0-1625106781803.png

    This is my list2

    vLilyWmsft_1-1625106781806.png

    Flow in details:

    vLilyWmsft_2-1625106781810.png

    vLilyWmsft_3-1625106781815.png

    Expression in Budget name: null

    Expression in Total Budget available: sub(items('Apply_to_each')?['Budgetname'],triggerOutputs()?['body/Amount'])

    vLilyWmsft_4-1625106781817.png

    When the Expense Code EA4 be modified as below:

    vLilyWmsft_5-1625106781819.png

    List1 will update as below:

    vLilyWmsft_6-1625106781821.png

    Hope the content above may help you.

    Best Regards

    If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    on at

    Thank you that worked wonders! 🙂

     

    However i do have a small issue

    In List2 if i have two items using expense code 111 it will only deduct one of those amounts from the balance on List1. 

    How would you recommend i edit it so any / all items using expense code 111 are taken from the balance?

  • Community Power Platform Member Profile Picture
    on at

    HI,

     

    So i've been working on this and while it's close to what i'm after it's not quite there so wondered if you could please assist a little further.

     

    I would like the flow to update list 2, Total remaining, to show the balance after every item with expense code EA4 is removed from that balance, for example:

     

    List 1:

    EA4 Laptop £200

    EA4 TV £200

     

    List2:

    EA4 Electronic (Budget Name) Allowance: £1000 Total Remaining: £600

     

    Hope that makes sense

  • v-LilyW-msft Profile Picture
    on at

    Hi @Anonymous 

    Do you want to calculate the sum of all EA4 in list2, then subtract the sum from the name in list1 and fill it in Total Budget available when a new item is created?

    vLilyWmsft_11-1625458061776.png

    vLilyWmsft_10-1625457984617.png

    If yes, please refer to as below:

    vLilyWmsft_2-1625457559267.png

    vLilyWmsft_3-1625457559268.png

    vLilyWmsft_4-1625457559275.png

    vLilyWmsft_5-1625457559280.png

    Expression: sub(items('Apply_to_each_2')?['Budgetname'],variables('amount'))

    vLilyWmsft_6-1625457559286.png

    Hope the content above may help you.

    Best Regards

    If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    on at

    Hey - Thank you for providing the above, are you able to share a screenshot of the full flow so i can make sure mine alligns up

  • Verified answer
    v-LilyW-msft Profile Picture
    on at

    Hi @Anonymous 

    The full flow screenshot as below:

    vLilyWmsft_0-1625468837752.png

    Best Regards

     

  • Community Power Platform Member Profile Picture
    on at

    Hiya,

     

    That's brilliant, i think it's almost there just one final thing - Budget name needs to be a word i.e Home Budget. I changed the Sub query from BudgetName to Allowance and tried to change the column of budget name to a single line of text but get the following:

     

     

    Capture.JPG

  • v-LilyW-msft Profile Picture
    on at

    Hi @Anonymous 

    Please try delete Get Items and create the action again, Then save the flow and run again.

    Best Regards

  • Community Power Platform Member Profile Picture
    on at

    Thanks that's worked great and is everything i needed, i really appreciate your help and support with this.

  • Community Power Platform Member Profile Picture
    on at

    Hi,

     

    For some reason i now have a slight issue.

     

    When i add the following entries to List 2, it's causing a problem

    Gelegeta_0-1626687472668.png

    Gelegeta_1-1626687507872.png

    As you can see it's taken £100 off all rows in list 1 not just the row with BN01

     

    Any advice

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard