29-12-20 07:36 PM
Hello, I'm trying to copy a file to a destination folder.
Before copying, I need to check whether the folder is empty,
if it's not empty, I need to trigger a email with filenames found in the folder, and
if it is empty, just copy.
I tried to use action Get Files, and follow by a Decision stage using the Successful Flag generated by the VBO.
The problem is no matter there is or is not file in the folder, the 'Success Flag' is always TRUE, so it always go to email sending stage?
Besides, how can I get the file names (normally 1 or 2 files only) from the Collection and include them in the email?
------------------------------
Regards,
Yingjie
------------------------------
30-12-20 12:22 PM
Hello,
Below is a sample flow which can serve your purpose
First you would use the same Get Files action on the folder;
The File details ( if any file is present ) would be in the output collection of Get Files
If there are any files present the rows in the collection would be greater than 0 and the process can get file names and send email
To extract the file names you can use a loop and keep on appending the values of Files collection.Name in a data item and append that data item in the email
let me know if you face any issue
------------------------------
Harshit Rawat
------------------------------
22-05-21 01:07 PM