web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get itemId of an attac...
Power Automate
Unanswered

Get itemId of an attached item in sharepoint list, save it in an excel and then update an item in a list in sharepoint

(0) ShareShare
ReportReport
Posted on by 265

Hello everybody ! .
I am attaching different files in different items in a sharepoint list.

 

Pregunta 3.png

 

In another step, I update under certain conditions the details of that document (e.g. name). For that, I save in an excel the file folder, its name and need to save its ItemID. I know that the Item ID must be obtained through "obtain metadata of a file by path".

 

Pregunta 1.png
My problem is that I can't save the ItemID so that it can be used in "update item in sharepoint".
Pregunta 2.png

 

 

I don't know what I'm doing wrong or how I can resolve this. Can you please help me? Thanks

Get itemId of an attached item in sharepoint list , save it in an excel and then update an item in a list in sharepoint

Categories:
I have the same question (0)
  • PrasadAthalye Profile Picture
    on at
    Re: Get itemId of an attached item in sharepoint list, save it in an excel and then update an item in a list in sharepoint

    @elaaadani - Can you please clarify following ...

     

    1. Do you have a SharePoint List OR A Library? Looks to me like a SharePoint List.
    2. What is the trigger of this flow? Is it when an Item is Created?
    3. If # 2 is correct, then you can get Item ID from the trigger properties itself...
  • elaaadani Profile Picture
    265 on at
    Re: Get itemId of an attached item in sharepoint list, save it in an excel and then update an item in a list in sharepoint

    @PrasadAthalye 

    Thank you very much for replying !!
    My trigger is when an excel file is created in OneDrive.
    With this I perform a series of actions.
    I create elements but inside folders by HTTP request. In that element that I create inside the folder, then I attach a document (what I show in the image)

  • PrasadAthalye Profile Picture
    on at
    Re: Get itemId of an attached item in sharepoint list, save it in an excel and then update an item in a list in sharepoint

    Ok, thank you. So are you looking for ItemId related to Excel that you are creating in one drive?

  • elaaadani Profile Picture
    265 on at
    Re: Get itemId of an attached item in sharepoint list, save it in an excel and then update an item in a list in sharepoint

    @PrasadAthalye ItemID of items in a list in sharepoint.
    I already have the Id of these items.
    My problem now is that I save that ID in excel and when I invoke it in an update element
    in sharepoint, it tells me that it must be of type Integer.

    This is what I do so far. Aux5 is of type integer and in excel the ID column is of type numeric.

    Pregunta2.png

    Pregunta 3.pngPregunta1.png

     

    How can I pass that ID saved in excel to Integer so that update element can understand it?

  • Verified answer
    PrasadAthalye Profile Picture
    on at
    Re: Get itemId of an attached item in sharepoint list, save it in an excel and then update an item in a list in sharepoint

    Thank you for the details. Can you convert the excel column using Int and see if that works? I had a similar requirement to convert the excel column to float and since it's an Array of rows from excel, I am setting it within the loop. Please refer below...

     

    Here is my expression --> 

    int(items('Apply_to_each')?['Difference']) 
     
    so may be in your case, inside loop you can use expression if your excel column name is ID --> 
    int(items('Apply_to_each')?['ID'])

     

    PrasadAthalye_0-1611850913146.png

     

  • elaaadani Profile Picture
    265 on at
    Re: Get itemId of an attached item in sharepoint list, save it in an excel and then update an item in a list in sharepoint

    @PrasadAthalye thank you. I have a question. How do I do that Int for the column "ID" ? When using expressions, I only get "value" or "body".


  • Verified answer
    PrasadAthalye Profile Picture
    on at
    Re: Get itemId of an attached item in sharepoint list, save it in an excel and then update an item in a list in sharepoint

    You will have to manually type it in the expression... also you will have to run a apply to each.... You can add apply to each loop on the value array and then use an expression that I gave above... Let me know if it works...

     

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

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard