cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JPC
Level: Powered On

Get file name for a selected item

Hello, 

 

For a selected item in a SharePoint list, we would like to add a file when the user selects the item with a Flow button:

2019-02-20_15h07_23.png

 

I found a way to add the file content, but what about the file name? 

 

Here are some snapshots of the Flow:

1. Where the user will add the file:

2019-02-20_14h51_00.png

2. When the file attached in the list item - how do I get the file name here? 

2019-02-20_15h01_46.png

 

Thank you

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Get file name for a selected item

Hi @JPC ,

 

You could take a try with expression below:

string(triggerBody()?['file']?['name'])

And the solution is refered in link below:

https://www.o365dude.com/2017/10/15/new-flow-button-inputs-available/

 

Please let me know if your probelm could be solved.

 

Best regards,

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

View solution in original post

Highlighted
JPC
Level: Powered On

Re: Get file name for a selected item

Hello, 

 

Thank you for this. I have added this in the Flow.

By the way, do you know how to handle this with several files? 

 

2019-02-21_12h00_36.png

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Get file name for a selected item

Hi @JPC ,

 

I believe attach CRM Content is something like a browse button and select the file. Why not pass the filename at the same time? Where you running the flow from?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Community Support Team
Community Support Team

Re: Get file name for a selected item

Hi @JPC ,

 

You could take a try with expression below:

string(triggerBody()?['file']?['name'])

And the solution is refered in link below:

https://www.o365dude.com/2017/10/15/new-flow-button-inputs-available/

 

Please let me know if your probelm could be solved.

 

Best regards,

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

View solution in original post

Highlighted
JPC
Level: Powered On

Re: Get file name for a selected item

Hello, 

 

Thank you for this. I have added this in the Flow.

By the way, do you know how to handle this with several files? 

 

2019-02-21_12h00_36.png

View solution in original post

JPC
Level: Powered On

Re: Get file name for a selected item

In between, I found a way to analyse the formatting of the different files by adding the following in Flow:

2019-02-21_15h45_06.png

When running this Flow, I was able to extract the information to be completed in the following stages in order to extract the file names (first file is 'file', second is 'file_1',...)

 

2019-02-21_15h46_57.png

 

In my Flow, the first file is mandatory, others are optionals (content is checked):

 

2019-02-21_15h50_04.png

 

 

 

 

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,633)