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 / Retrieving sharepoint ...
Power Automate
Unanswered

Retrieving sharepoint list item and update that value based on another column

(0) ShareShare
ReportReport
Posted on by 14

Hi Guys, 

 

I'm new to Power Automate, just finished some online courses and trying to create a new leave tracker for my small team.

 

I have 2 Sharepoint list:

 

1) Leave Request:

RoystonKok85_0-1698132268683.png

2) Leave Balance

RoystonKok85_1-1698132307767.png

 

Objective:

 

When I create a new Leave request, e.g, John, AL Days = 2, CCL Days = 2

 

The flow will go to my Leave Balance sharepoint list, find John, and subtract the AL Days and CCL Days from the current number

 

RoystonKok85_2-1698132563986.png

This is my thought process. First when a new item is created or modified in Leave Request, I'll get Item from Leave Balance, and for each number of days that I've inserted into AL days and CCL days, these will be subtracted from AL and CCL (Leave Balance ) respectively.

 

I've tried many times but I can't seem to get the flow running. Just hoping someone can guide me to getting the flow or logic working. 

 

Thanks in advance

Categories:
I have the same question (0)
  • _minnies_ Profile Picture
    91 on at

    Hi @RoystonKok85 

    by you can't get the flow running you meen you can't get it triggered? Is the flow activated and have you tried to use the manually test?

     

    Best regards

    Jeanine

  • RoystonKok85 Profile Picture
    14 on at

    Hi @_minnies_ , i think my flow is not complete, these i'm getting error.  Either i'm using the wrong logic or inputs. I've tried testing multiple times but i cant seem to find a post similar to my circumstance.

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

    Hi @RoystonKok85 ,

     

    Please try this:

     

    Overview:

    "When an item is created" connects request list.

    "Get items" connects balance list.

    vmengmlimsft_0-1698133664375.png

     

    The apply to each action:

    The value comes from "Get items".

    The title is equal to "EmployeeName" in balance list.

    The Name is equal to "requestor name" in request list.

    The ID comes from "Get items".

    The expression about sub:

    sub(int(items('Apply_to_each')?['AL']),int(triggerOutputs()?['body/ALDays']))
    sub(int(items('Apply_to_each')?['CCL']),int(triggerOutputs()?['body/CCLDays']))

    vmengmlimsft_1-1698133840301.png

     

     

    Best regards,

    Rimmon

  • RoystonKok85 Profile Picture
    14 on at

    Hi @v-mengmli-msft 

     

    I've hitting error on the Get  Item

     

    RoystonKok85_0-1698135168478.pngRoystonKok85_1-1698135215649.png

    Thank you,

    Royston

  • RoystonKok85 Profile Picture
    14 on at

    Hi @v-mengmli-msft ,

     

    Thank you, I think i made a mistake in the Get Items (i used Get Item) instead.

     

    Thank you,

    Royston

  • RoystonKok85 Profile Picture
    14 on at

    Hi @v-mengmli-msft ,

     

    In the condition step, i keep getting false values and am unable to trigger a true condition, thus i've not been able to proceed to the step where they subtract.

    RoystonKok85_1-1698137657019.png

     

    RoystonKok85_0-1698137639723.png

    In the below screenshot, I've indicated the 2 fields which clearer shows they are the same however, the condition is still not successfully reading and comparing the 2 values.

     

    Leave Request:

    RoystonKok85_2-1698137728040.png

    Leave Balance:

    RoystonKok85_3-1698137742311.png

    Thanks in advance.

     

    Best Regards,

    Royston

  • v-mengmli-msft Profile Picture
    on at

    Hi @RoystonKok85 ,

     

    Please check the dynamic content in condition:

    They should be "Requestor name" and "EmployeeName" or "Requestor name Value" and "EmployeeName Value" instead of "Requestor name Value" and "EmployeeName".

     

    Choice column in Dynamic Content have two formats, if you want to compare the values of two choice columns, they should be in the same format for comparison.

    The "BalanceName" is the name of my choice column.

    vmengmlimsft_0-1698139060617.png

     

     

    Best regards,

    Rimmon

  • RoystonKok85 Profile Picture
    14 on at

    Thank you @v-mengmli-msft 

     

    Thank solved the issue!

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard