I'm basically wanting to disable a container based on Today's day. I've tried multiple setups but I can't seem to get the container to disable. If it is not Saturday then remain enabled, vice-versa.
Solved! Go to Solution.
Hi @Adrian01 ,
You were almost right. The only thing you need to update is your condition formula to:
DateTimeFormat(datetimetoday(),"%A")='Saturday'
Let me know if that works for you.
Best,
Fernando Vizcaino
I changed the condition to test for the day being "Tuesday" but the container still has a text output. I have tested the IFF condition in a formula tool on another workflow and it outputs as "True" when I change it to "Tuesday".
What am I doing wrong? Or is there a better way to basically shut off this input from processing?
Hi @Adrian01 ,
Remove the iif clause from the condition and leave the formula as:
DateTimeFormat(datetimetoday(),"%A")='Tuesday'
It will work this way.
Hi,
Could you help me understand what's actually being done here? Apologies if my question is silly.
I tried changing the date but that doesn't seem to change anything in the output. The test data table still comes through even when the control parameter is false.
I am trying to see the same how we can enable/disable container dynamically.
Thanks!
Hi @JohnsonRaju
The workflow tests if the date in the date field is a Saturday.
If it is a Saturday, a True value is passed to the control parameter of the macro, which means the container is disabled and the output data tool does not execute.
If the date is not a Saturday, a False value is passed, which means the container is not disabled and the file is written.
You can change the rule that disables or enables the macro by changing the If statement in the formula tool in the workflow.
I hope this makes sense.