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 / Get item from previous...
Power Automate
Answered

Get item from previous row SharePoint LIST

(0) ShareShare
ReportReport
Posted on by 35

Hi,

 

In my Power Automate Flow I create a new row to the SharePoint List. It automatically add the today date and a random Number. 

What I want : is to SUM the number from previous row with the new random one.

 

Thanks for help !

 

Annotation 2022-03-24 161059.png

 

 

 

 

 

Categories:
  • Verified answer
    rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @charlyOueoueoue 

     

    Consider the following:

    • Create item (this is when you create your random number and send to SharePoint)
    • Initialise a variable (varGetId) set the type to integer and the value to ID from Create item
    • Get Item (same site, same list, ID =  and Expression sub(variables('varGetId'),1)) (here you get the previous item to the one you created)
    • Initialise another variable with type float and value add(outputs('Get_item')?['body/currency'],outputs('Create_item')?['body/currency'])

     

    That should do it

    rubin_boer_0-1648143144286.png

     

    Hope it helps,

    R

     

  • charlyOueoueoue Profile Picture
    35 on at

    Thanks a lot @rubin_boer !

  • Sidhant_02 Profile Picture
    986 on at

    Hi @rubin_boer , @charlyOueoueoue 
    I had a similar requirement wherein user was using an excel sheet with a predefined template like this:

    Sidhant_02_0-1702278788012.png

    So the user can fill in the required information and then upload this file which will store the details in the SP list

    Sidhant_02_1-1702278868850.png

    For extracting the data from the excel and saving it I have created a flow which looks like this

    Sidhant_02_2-1702278947113.png

    Now to get the recent employee id I have created a variable named employeeId (Action name: Idvar) which is of type string and value is blank, now in the apply to each I have added a condition to check if the employee id is blank or not in the excel uploaded) if it is blank then I want to use the recent employee id value to it so in that case how to do that

    Sidhant_02_3-1702279367315.png

     

    In the SharePoint list the data is getting saved as defined in the excel but now to make it more clearer I want to associate the Id field to the most recent if it is blank the reason for it is as the value for some fields (like Qualifications, Project Detail if there are more than one its being defined on new line not comma separated)
    So when I display the data using a gallery:

    Sidhant_02_4-1702279578817.png

    (As per the notation I want the next row value to be associated with the previous row if the EmployeeId field is blank in the excel sheet )

    Sidhant_02_5-1702279666943.png

     



    (I have also posted some questions on the Power Apps forum, if you can provide some help it will be helpful, the links to which are as follows:
    Query-1 
    )

    Regards,
    Sidhant

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