Hi All,
I have a bit of a strange question that I couldn't find an answer to online. I have several workflows that I run each day where only want to output a file the first time it is run each day. The reason for this is I am using the file output to create a file to use as a comparison for the next day, and then I need to review the data which is going out to SharePoint, ensure that it is correct and then re-run the workflow to actually do the SharePoint update. What I would like to happen is that the comparison file is created during the initial run, then after that the file output container is auto-disabled when the workflow detects that there is already a file there with the same name. The file output simply adds a new tab to the existing file with the new tab being the date of the run as created in the formula tool.
Is there a way to have the file output container or a control container auto-disable itself when the workflow detects the tab with the current date?
Solved! Go to Solution.
Hi @MattR79
-You can use input tool to read list of sheet names in the output excel.
-And use a filter to check whether sheet name with current date is present
-If yes collapse control container
Hope this helps : )
Would you be able to provide a bit more detail on how to use the filter tool to use the control container? I have never tried to use one before so I am not sure how it works.
Look at the one Filter tool in the workflow I posted. If no records come out of that Filter, the second Control Container is not executed. No need to "disable" it.
Control Containers have an optional input anchor. Use this input to activate the container.
Chris
That doesn't work for me because almost all of the sheets are not going to equal the sheet name that should not be overwritten. See the below for my input vs my output to the control container. Since the file contains many sheets, all of which are named as the date they were created, only one is going to match and the rest will not, therefore the container will never close since it always has sheets that don't match. I hope I'm thinking of this correctly.
Input Sheet Name | Sheet name that should not be overwritten |
2024-10-22 | 2024-10-30 |
2024-10-22 | 2024-10-30 |
2024-10-23 | 2024-10-30 |
2024-10-24 | 2024-10-30 |
2024-10-25 | 2024-10-30 |
2024-10-28 | 2024-10-30 |
2024-10-29 | 2024-10-30 |
2024-10-30 | 2024-10-30 |
My Input Data tool was just an example, to get data into a Filter tool, to join to the Input Anchor of the second Control Container.
You'll need your own logic that achieves the goal: only allow data to exit a Filter tool if the connected Control Container should be executed.
If you can post your entire workflow and explain when a Sheet should/should not be overwritten, I could possibly help. I know in your original post you tried to explain in words, but it's not clear to me.
Or maybe you could create a smaller mock-up of your entire workflow, and show which Sheet(s) should be overwritten, and why.
Chris