web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Lookup photos based on...
Power Automate
Answered

Lookup photos based on list of Staff IDs in Excel file

(0) ShareShare
ReportReport
Posted on by 184

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 

Categories:
I have the same question (0)
  • Gristy Profile Picture
    2,429 on at

    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 Profile Picture
    on at

    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.

  • Verified answer
    PipManifold Profile Picture
    184 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard