cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
logansummers
New Member

Rename Sharepoint File based on folder name and custom column value

Files are uploaded to Sharepoint folder via API from Salesforce and and XFilesPro, we need to rename the file.  The file will be the folder name (current folder, not full path) followed by value in a custom column we have created called "Document Type".  

 

The trigger for the flow should be when the value of the custom column "Document Type" is updated.  

 

We have searched the community forums for help on this, but so far we have more questions than answers.  Can anyone help us with this?

 

Thanks so much for any help.  

1 ACCEPTED SOLUTION

Accepted Solutions
annajhaveri
Super User
Super User

@logansummers For trigger of the flow you need to use "When an item or a file is modified" trigger and then add "Get changes for an item or a file (properties only)" action and configure as shown in below screenshot. Then add condition action, where from Dynamic Content you will be able to select Has Changed: column name to check the value of whether the column value has been updated for that column or not.

 

annajhaveri_1-1615213901669.png

 

Then to rename the file i think you will need to use REST API in Send HTTP Request to SharePoint action, configure it as shown in below screenshot, here I am using static file name. But you can get the Folder Name and Custom column value from dynamic content to create the file name 

 

annajhaveri_0-1615215104800.png

 

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
annajhaveri
Super User
Super User

@logansummers For trigger of the flow you need to use "When an item or a file is modified" trigger and then add "Get changes for an item or a file (properties only)" action and configure as shown in below screenshot. Then add condition action, where from Dynamic Content you will be able to select Has Changed: column name to check the value of whether the column value has been updated for that column or not.

 

annajhaveri_1-1615213901669.png

 

Then to rename the file i think you will need to use REST API in Send HTTP Request to SharePoint action, configure it as shown in below screenshot, here I am using static file name. But you can get the Folder Name and Custom column value from dynamic content to create the file name 

 

annajhaveri_0-1615215104800.png

 

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (2,094)