cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Amghost
Helper II
Helper II

Renaming Files uploaded to Sharepoint Document Library via PowerApps

Hello,

I have built a PowerApp that is very basic and based on a SharePoint Document Library.  The libary contains 4 columns used by the app (Name [which is the attachment when uploaded], Client, Billing Cycle, Service. 

The Client, Billing Cycle and Service Columns are all "Choice" type that I use in the App.  I have a flow that grabs the attachment and the dropdown values in the App, creates a JSON string and some variables and uploads it to the library.  It works well and puts all the files in their respective folders.

The issue I have right now is that there is no consistent naming convention on the files.  I want to use the values in the Drop Down to force a file naming convention for consistency.  

How do I take these values (which I convert to variables) and use them to rename the files?  

Possible?

2 ACCEPTED SOLUTIONS

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @Amghost 

 

If you want the user to provide a text input for the file name, you can create a text input box on the app and make as a required entry to trigger the flow. On this text input box set condtions on the way you want the text to be (for example a specific number of characters or characters only etc) and then in Power Automate while creating the file you can use this text and the utcnow('MM-yy') to append the current month and year to the file name and make it more consistent. Again there are a lot of ways you can do this. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Amghost
Helper II
Helper II

Got it.

It was easier than I thought.

In the Create File SharePoint control, all I had to do was put my variables in there and it works to rename the file what I want.

FlowName.JPG

 

View solution in original post

3 REPLIES 3
v-litu-msft
Community Support
Community Support

Hi @Amghost 

 

There is no action to rename SharePoint files directly currently. Maybe you could consider using "Send an HTTP request to SharePoint" action to rename the file.

You could refer to the following image, the red line marked is my library name:

Besides, for more information about SharePoint HTTP request, please refer to the link:

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest

Please take a try.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

yashag2255
Dual Super User II
Dual Super User II

Hi @Amghost 

 

If you want the user to provide a text input for the file name, you can create a text input box on the app and make as a required entry to trigger the flow. On this text input box set condtions on the way you want the text to be (for example a specific number of characters or characters only etc) and then in Power Automate while creating the file you can use this text and the utcnow('MM-yy') to append the current month and year to the file name and make it more consistent. Again there are a lot of ways you can do this. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Amghost
Helper II
Helper II

Got it.

It was easier than I thought.

In the Create File SharePoint control, all I had to do was put my variables in there and it works to rename the file what I want.

FlowName.JPG

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,418)