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

How get ID from file

How can I get the ID of a file from its name, in a SharePoint library.

 

I want to change the properties of the elements in a folder, and I can recover the elements but their ID is not an integer but more like a char type, so if I already access the elements, how can I recover their ID (INT)?

2 REPLIES 2
Jaimellanos
New Member

I'll ready find the solution, thanks to all you people.

v-albai-msft
Community Support
Community Support

Hi @Jaimellanos ,

Not sure if you had found the solution but I will still post my flow so that others who  stuck with the same question can directly get the answer.

For get the ID column value based on the file name in a library(you can also get other column value), you can try this flow:

first(body('Filter_array'))?['ID']

If you want to get other column value, just change the last paramater to your column name, so expression should be like this:

first(body('Filter_array'))?['ColumnName']

valbaimsft_0-1627028567503.png

Note: When comparing with "Filename With Extension" column in the Filter Array action, you should enter your value manually or use a variable("name2" is one of the file name in my library)

Best regards,

Allen

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

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

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,988)