Hi all,
I have a very basic scenario that archives items in a Webflow CMS if all of the date fields in an item are in the past.
Technically the scenario works perfectly fine, but I have one issue: If any of the date fields in an item are blank the scenario treats them as dates that aren’t in the past, instead of ignoring them. This means if out of four fields three of them are in the past and the fourth is empty, the item won’t be archived.
Below are two screenshots that show the setup. It’s very basic with a filter in between.
How can I update this so that it ignores any blank fields? Do I need to structure the scenario completely differently? I rarely use Make so sorry if this has an obvious solution.
Thanks!
Hey Philemon,
so if a date is empty you want to treat it as if its in the past right?
You can use the ifempty() function to replace an empty variable with a placeholder and set some date that will always be in the past. Just remember to use parseDate() on it so the check works.
Hi Stoyan,
Thanks for responding. Yeah that sounds right. How would I implement this? Like what modules and where would they go?
Thanks!
These are just functions. You can add them directly in the filter and place your variables inside them. Inside the first screenshot you shared - just wrap all the dates inside the ifempty() function and put a placeholder date as the second argument.
Thanks so much for that extra info. My setup looks like the image below now and seems to work well after some testing! Thanks so much.