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

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

Helper I
Helper I

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

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

Helper I
Helper I

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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (20,060)