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 / Automated flow to upda...
Power Automate
Unanswered

Automated flow to update duplicate SharePoint Online 'Version' column

(0) ShareShare
ReportReport
Posted on by 6

Hi All,

I'm very new to Power Automate and am struggling to achieve what I had hoped would be a simple task. 😅

 

I need a custom field in a SharePoint Online (SPO) library that contains a dynamic copy of the file Version number (duplicate Version field called 'SPVersion' - to feed Excel Macros).

SPO Calculated fields seem useless in this context as they don't automatically recalculate when the version number changes (Major + Minor), so I'm hoping a Flow might help?

 

I've started looking at a flow of the following design, but am struggling to get the connection to the library in the HTTP Request working correctly... (Error: "Input string was not in a correct format.").

I'm also not yet sure how to complete the loop and update the value in the 'SPVersion' field (still investigating expressions).

 

Allowing for my flimsy understanding of this platform, is anyone able to guide me to get this right, and completed please?

 

AnnaliseB_0-1622518314240.png

Thanks, AB

Categories:
I have the same question (0)
  • jinivthakkar Profile Picture
    4,187 on at

    @AnnaliseB has this been resolved ?

  • AnnaliseB Profile Picture
    6 on at

    not yet, no.

  • jinivthakkar Profile Picture
    4,187 on at

    @AnnaliseB This is what I have done to get the version history of the item

    jinivthakkar_0-1623045209706.png

    _api/web/Lists/getbytitle('Employee')/items('ID')/versions /*endpoint*/
    
    outputs('Send_an_HTTP_request_to_SharePoint')?['body']?['d']['results'][0]['VersionLabel'] /*extract from http output*/

    Hope this helps.

     

    And I think you have also done everything correctly, you just need to pass the ID in single quotes 'ID', you have just passed the ID which is number, hence you are getting the error that input needs to be a string. Just pass the ID in your http action like this 'ID' it should work.

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • AnnaliseB Profile Picture
    6 on at

    Since my last post I've found a solution that works though I've discovered my design is a little flawed in logic (the "SPVersion" field is always one minor version behind as a consequence, or there would be an infinite loop 😅)

     

    AnnaliseB_0-1623049082580.png

    Uri:

    _api/web/lists/GetByTitle('Training Internal Reference')/items(@{outputs('Get_file_properties')?['body/ID']})/validateUpdateListItem

     

    Body:
    {
    "formValues":[
    {
    "FieldName": "SPVersion",
    "FieldValue": "@{outputs('Get_file_properties')?['body/{VersionNumber}']}"
    }
    ]
    }

     

    Thanks,

    AnnaliseB

  • mabster168 Profile Picture
    4 on at

    Hello @jinivthakkar,

    I am really struggling with the power automate as i am wanting to add the Sharepoint Version in a excel document, all I know is that it can be done but I keep hitting walls. On the Uri above what should I be pointing it towards? as I am unsure where Employee comes from. I have spent weeks trying to sort it out and just come across your post. Many thanks in advance.

  • mabster168 Profile Picture
    4 on at

    Hello @AnnaliseB did you get this working in the end please i want to do exactly what you are doing. was your sharepoint a list or a group of documents.

     

    Thanks 

    Mark

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

#2
Tomac Profile Picture

Tomac 267 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard