Schedule-triggered flow is a type of flow that runs in the background at a specified time and frequency (daily, weekly, or one-time). You can select an object and set specific conditions in the start criteria of a schedule-triggered flow to perform actions on a batch of records. The flow then processes records that meet these criteria in batches of 200. Although multiple conditions can be defined, there is a limitation related to date values. The date filter only accepts manual date entries, not date fields or variables. For example, it's not possible to filter Opportunity records where the Close Date is today. Here is how to use a date field in the start criteria of a schedule-triggered flow.
Creating a Formula Field for the Start Criteria of a Schedule-Triggered Flow
You cannot use a date field directly in the start criteria of a schedule-triggered flow. As a workaround, create a formula field on the object and use it in the start criteria. For example, you could create a checkbox formula field that returns true when the Close Date of an Opportunity is today. By referencing this checkbox field in the start criteria, you can run your flow for records that are closing today. Here is a simple formula you can use:
CloseDate=TODAY()
Sometimes, a simple checkbox formula may not fully meet your needs. In such cases, you can create a formula field as text or number to support multiple scenarios.
For example, if you want to perform different actions based on the number of days remaining until the Close Date, you can create a formula field that returns the difference between the Close Date and the current date.
CloseDate - TODAY()
You can then configure the flow to perform different actions based on the number of days remaining until the Close Date.
As you can see, creating a formula field allows you to easily use a date field in the start criteria of a schedule-triggered flow.
Leave a Reply