cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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

@Anonymous 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

@Anonymous 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.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,200)