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

Get file properties

When a file is created in a folder, I would use the properties of the file as use when I use the trigger when a file is created (properties only) that it only directs to the library. It is possible?

10 REPLIES 10
Community Support
Community Support

Hi @krisdiogo,

 

Do you want to create two triggers within one flow?

Further, do you want to get the file properties using “When a file is created in a folder” trigger and then use the properties in “When a file is created (properties only) trigger”?

 

Multiple triggers are not supported in Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please vote the following idea:

https://powerusers.microsoft.com/t5/Flow-Ideas/Multiple-Triggers-For-The-Same-Flow/idi-p/41352

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dear,
Thanks for the answer.
What I need is to get the properties of the file by using the "SharePoint - When a file is created in a folder" trigger. To configure this trigger, we inform the Site and the Folder. To search the properties of the file, only opens the option to search the entire library, but this is not what I need, I would like to extract the properties of a single file.

 

Capturar.JPGCapturar2.JPG

Same here. I want to get new files. Check if they have a property and if they have that property make a copy to another library. How?

@AndreasLindholm 

Did you ever get an answer to this?  

 

I'm looking to read files in a library, if the file property (column ShowDate) matches today's date, copy the file to a new doc library.  

Any help is appreciated!

Hello Team,

 

I have a solution for you-

 

yashkamdar_0-1599861128618.png

 

 

Real Magic is in the expressions, so you get all the Files and then do a comparison to check if Modified date is equal to Current date using the expression below-

 

formatDateTime(items('Apply_to_each_2')?['Modified'],'yyyy-MM-dd')  is equal to 




formatDateTime(utcNow(),'yyyy-MM-dd')

 

 

yashkamdar_1-1599861145623.png

 

 

I just tried this out and it works charms !!!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

@yashkamdar 

 

OK I was able to get that to work, but it's returning no results.  I was previously trying to match against a custom column, where I have dates added, each file with a unique date.  It errors out everytime I try to match against those fields.  So if that won't work, the question now becomes this. 

 

How can I match against a custom column, and if a match then modify the item, so that it would then match on the above Modified = [today]?  

 

I'm sure I'm doing a bad job explaining this, my brain is fried.  

 

Thanks for responding, 

Kevin Wolf

Hello Team,

 

For this to work, you will need to first Modify one of the existing files during testing and then run the flow.

 

I have already written the expressions in such a way that Modified is equal to today, so the expression on the left checks the Modified time and the expression on the right checks today's time and if they match then it returns TRUE.

 

So just go ahead modify a file and then run the flow it will surely work..

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

So that works. In the whole flow though, I would need a file to be modified everyday to make it match, and then ultimately copy to a different library.  

 

Just matching the modified date to today will only work if the file that needs to show that day, can be automatically modified so that it will match.  Otherwise all files will be last modified when I do the upload, say a static date of 9/12.  If there isn't an action to modify the file, they will only be equal to TODAY on 9/12. 

 

 

Yepp you are spot on about this !!!

 

See Modified column was just an example for you, you can basically create a custom column, fill it up with a date say 15th September 2020 and then just leave the flow was is. 

 

Flow will trigger everyday and check if the date in custom column matches the current date till 14th September but on 15th September when your flow runs the condition will get matched and your flow will automatically be copied.

 

You can replace the Modified column with any column where you can push the date, important thing is that you now know the logic so you can create similar stuff for different scenarios.

 

Also, it would be great to accept my answer as a solution, if you think the answer has helped you and can be helpful to others looking for a solution to similar problem.

 

 

 

OK, that's what I thought, and maybe I'm missing something really basic here (very likely).  I'm getting the error  below anytime I try to run it against a different column.  I tried text, a Date/Time formatted column, everything.  

 

Unable to process template language expressions for action 'Condition' at line '1' and column '28202': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.

 

I've read the date/time usage and can't see anything wrong with my formatting.  

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (7,589)