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

Lookup photos based on list of Staff IDs in Excel file

Hi there,

 

I have a list of staff ids and I want to know if I have a photo of each staff member or not.  We keep the photos in a SharePoint folder named as the id number and some photos also have the staff members name after it.  The ID number is always at the beginning and is 7 digits long

 

I would love to create a Flow which can check for matches and if it finds one list the file path next to the staff number in my excel sheet.

 

I've started with the basics

 - Button trigger

 - List row present in table (Excel)

- List folder (Sharepoint)

 

However after than I'm a little stuck on how to pull out the ID number from the photo file name (get flow to ignore the .jpg or if the staff member name is also included) and match this to the Excel entry.  I've tried to set up the file name as a string and then initialise variable with the expression 

substring(variables('FileNameString'),1,7)

however it puts this in an apply to each loop and wont let me set up the second need initialise variable.  I've also tried to use it directly in the condition field and it wouldn't validate.

 

Any suggestions?

 

Thanks so much 

1 ACCEPTED SOLUTION

Accepted Solutions
PipManifold
Resolver I
Resolver I

Hi Everyone.  

Thanks for all your helpful advice. I've worked it out.  Just has to get my head around how to feed the data back into my spreadsheet and realised this had to be triggered by what my initial query to find the file found.

 

Here is the Flow for anyone's future interest:Capture 1.PNGCapture 2.PNG

This program is to coordinate students as staff, which is why the matching identifier in this case is a student number rather than a staff number.

View solution in original post

3 REPLIES 3
Gristy
Resident Rockstar
Resident Rockstar

you cannot init a variable inside a loop, this needs to be at the top of the flow, you can then manipulate variables inside the flow no problem.

v-litu-msft
Community Support
Community Support

Hi @PipManifold,

 

If you want to get these files names to create an array, you could refer to the following Flow structure:

Annotation 2020-01-17 164333.png

 

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.

PipManifold
Resolver I
Resolver I

Hi Everyone.  

Thanks for all your helpful advice. I've worked it out.  Just has to get my head around how to feed the data back into my spreadsheet and realised this had to be triggered by what my initial query to find the file found.

 

Here is the Flow for anyone's future interest:Capture 1.PNGCapture 2.PNG

This program is to coordinate students as staff, which is why the matching identifier in this case is a student number rather than a staff number.

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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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