Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Update date on list if matching filename found in library

(0) ShareShare
ReportReport
Posted on by 16

hi there,

 

I was wondering if you guys can help me figure it out. I am stuck.

 

I'm trying to create a flow that will do the following:

When a file is created or modified in a document library, insert a date in a  list column.

 

So say I have a LIST called TestList and it has the following columns:

First Name, Last Name, Gender, Date,  UniqueID (which is a calculated field that concatenates the first 3 columns) 

First NameLast NameChoiceFiledateUniqueID
JohnSmithR1A John_Smith_R1A
JaneDoeV2A Jane_Doe_V2A

 

And then I have a DOCUMENT LIBRARY called TestLib which is where pdf files that are named exactly like the UniqueId on the list are saved (no metadata, just filenames). So the library will contain:

John_Smith_R1A.pdf

Jane_Doe_V2A.pdf

 

I need it so that every time a matching filename is placed in the library, the flow will run and put a date on the "FileDate" field of the matching list item.

Date is ideally the modified date. Also, only update ones with no dates so if a date exists then don't update it.

 

I tried to create this flow:

cs024_0-1600302336730.png

But in "Get Item" I can't get the "UniqueID" field. It is only showing me "ID" to pick from.

 

Can someone please help?

Thank you so much in advance,

CS

 

 

  • efialttes Profile Picture
    14,756 on at
    Re: Update date on list if matching filename found in library

    @cs024 

    I just so this topic was marked as solved, so I guess it was you that followied the instructions and overcame the challenge. Thax for your kindness, and Happy Flowing!

  • Verified answer
    efialttes Profile Picture
    14,756 on at
    Re: Update date on list if matching filename found in library

    Hi!

    I would try to add a 'get items' instead, and filter those whose UniqueID matches your current file name without extension.

    You can filter by means of an ODATA expression inside 'Get items' or by a 'Filter array' action block.

    Let's assume you implement it by means of an ODATA expression, so it will be easier:

    So your 'Get items' output will be an array, ideally you will get either 0 or 1 elements inside. You can evaluate its length by means of one or more Condition action blocks and act accordingly, the trick is to evaluate 'Get items' outputs length by means of the following WDL expression:

     

    length(body('Get_items')?['value'])

     

     

    If you are unfamiliar with ODATA expressions, please check this great article:

    https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/

     

    If you are unfamiliar with WDL expressions please check here:

    https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/

    Hope this helps

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow