Hi,
I have a workflow that is going to run in a server. I would like to schedule it twice. When it detects a file on the first run, it will automatically run. But it will no longer run on the second schedule. But if on the first run, it does not detect the file, it will not run. On the second run, if it detects, it will run. I am using a directory tool to point the folder or files location. I would like it to create a log that will contains the filenames and dates.
Please show me a sample workflow on how to do it.
Thanks,
Kamen
Solved! Go to Solution.
@KamenRider in your above workflow make sure you are reading the Email Status from the same file and updating the same file, so when it read first time the email_Sent flag is set to 0 hence it will send the mail and update the variable to 1, for the subsequent run it will not trigger any emails
Note: There is a problem once the 3 runs completed you need to re-set the email_set flag to 0 other wise the flag will always 1 and it will never sent email for a fresh run
HI @binuacs
Thanks for the response. I noticed that the formula tool has no contents. I used this formula "IF ISNULL([Email Sent]) OR [Email Sent] = 0 THEN 1 ELSE [Email Sent] ENDIF". While it works, on the second run, it has no value. What do you think?
Please advise.
Kamen
@KamenRider sorry i missed that part in the formula tool, your formula should work,
in the second run the [Email Sent] field is 1 and the filter tool just filtering out all the records to the False anchor of the filter tool
HI @binuacs
I've noticed that the number of columns keeps increasing, and the "email status" column in the Excel file is empty after the first run. Is this expected behavior?
Please advise.
Kamen
Hi @binuacs
Not sure if this is the correct solution but seems to be working. After the formula "Email Sent", I added a select tool to select only the "Email Sent" field name and added after the Unique tool to remove duplication of "1". I noticed that this also remove the duplication that has been created in the output file.
Please advise
Kamen
@KamenRider You are correct, you should be using the select tool and only allow the email sent field to write in the email status file,