Skip to main content

Notifications

Power Platform Community / Forums / Building Flows / When a file is created...
Building Flows
Suggested answer

When a file is created in folder with "_signed", update sharepoint list

Posted on by 33
 
I have a sharepoint list to keep track of the ordering status with the supplier. 
 
I already had a flow where when the supplier gives me the quotation, it will download the file and create a folder for that quotation. The flow also generates the subfolder with suffix 'signed'. This is for me to sign the quotation manually, and deposit into this subfolder.
 
For example, the supplier will provide a quotation with a file name SO24-2502.pdf, then the flow generates an empty folder called SO-2502.pdf_signed.
Another example will be, a quotation with a file name ABC.pdf generated, then the flow generates an empty folder name called ABC.pdf_signed. 
Now I want to create a flow that triggers the sharepoint list (shown below) to update the 'Quotation Signed Date" column (based on the date and time the file is uploaded to the folder), when the signed quotation pdf is uploaded into the 'quotation signed' file, which is dynamically generated in my separate flow. 
 
 
Can someone suggest how to do this? I am stuck. Below is my flow. 
 
this trigger condition in trigger so that it executes the flow when the file is created under specific folder which has the name of file _signed 
 
 
 
Use condition to check whether any items with name of file exists in SP list before updating date field as shown below
Expression - (as shown below) 
length(outputs('Get_items')?['body/value'])
 
If condition is true, it means file details exists in SP list, so in yes branch use update item
 
Expression - 
first(outputs('Get_items')?['body/value'])?['ID']
 
When I tried to run this flow, nothing happened at all. 
 
Thanks for your help. 
  • Kehong Profile Picture
    Kehong 33 on at
    When a file is created in folder with "_signed", update sharepoint list
    @FLMike
     
    When I meant not working. It did not fire off when I did the test run. 
     
    This is what I see whenever I try the test run - A loading screen. 
     
    Eventually it times out and gives an error message. 
     
    Will you be able to advice why a Test Flow fails before I proceed to your suggestions? 
     
    Thanks for your help!
     
    Kind regards
     
  • Suggested answer
    FLMike Profile Picture
    FLMike 23,258 on at
    When a file is created in folder with "_signed", update sharepoint list
    HI
     
    Note: for your own safety you should black out your real addresses in your pictures.
     
    Question: You said when you tried to run it, do you mean test it or , when you did work, and a file got generated. so when you say it did nothing, do you mean it didnt FIRE off or it didnt do what you expect.
     
    I see nothing wrong with your flow.

    If your flow did not update a record (let's not say it did nothing we don't know that) the it's most likely 1 of 3things
     
    1) your filter is wrong in your Get Items and it returned 0 rows. That's almost 100% certain is what happened
    -However do I verify
    Go into the run, review the Inputs into Get Items and the Outputs (you should be able to click Download for the outputs) and I am going to guess when you get to the value property it just looks like [] aka blank/null/empty
     
    Now you need to figure out why.
     
    You need to look at the Filter Query, which will be part of the Action in the Run of that flow.
    But a second thing you can do and I do suggest it is this
     
    DO THIS:  Before your Get Items, add a Compose
    In the Compose put the Dynamic Property you are using in your Filter the one that starts with File name with
    let's just verify what you have there, so we can compare it against whats in the list, so we can see IF no rows were returned
     
    2) your condition is wrong
    I dont think its this I think it was exactly 0 records from #1 so this part probably worked as expected, just not as you hoped. so we need to fix #1 so read that section carefully.
     
    3) your not using the correct ID in your Update, where you have first. Now this one is definitely possible for sure, in which case the flow would probably run perfectly and this action would look like it worked perfectly and it probably did, it just didnt find any records.
     
    DO THIS: Before the Update Item
    Add a Compose, put your expression - the one in your ID property so we can see what you have there
     
    If you cannot click the plus above your Update, do this
    Put the compose below it
    Then drag the Update below it and they will re-arrange
     
     
    Now we have everything covered and we should easily see why it didnt update anything.
     
    If this solves your problem please mark as the answer
     
     

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 140,719

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,355

Leaderboard

Featured topics