Hi Colin,
I've made the updates to Workflow Elements and I think you'll be able to do what you need now in workflows. There will still be a little manual intervention periodically though, because of the nature of the requirement. Download Workflow Elements at kaskela.wordpress.com and you'd set up your workflow like this (assuming your FY is 1/1 to 12/31 inclusive):
- Workflow will be run on contact, and it can be run on demand or change of your field (I'll say "Last Purchase" for ease).
- Add a Date field to the contact "Last Purchase Evaluation"
- Add a boolean field to the contact "Last Purchase in FY"
The workflow will have these steps:
1 - Call activity "Date – Get Date Components", and pass in the Process Execution Time (the time when the workflow runs). You'll get back all the date components as individual parts.
2 - Call activity "Date – Build Date From Parts", and pass in 1/January for the month, 1 for the Day and (Step 1 - Year) as the Year. The resulting Date will be the beginning of the current fiscal year. (This was the activity I built today).
3 - Call activity "Date – Build Date From Parts", and pass in 12/December for the month, 31 for the Day and (Step 1 - Year) as the Year, 23 hours and 59 minutes. The resulting Date will be the end of the current fiscal year.
4 - Check condition - if "Last Purchase" is on or after (Step 2 Date) and it's on or before (Step 3 Date), it's in the Fiscal Year. Update the contact and set "Last Purchase Evaluation" to Process Execution and "Last Purchase in FY" to Yes.
5 - If not (step 4), set "Last Purchase Evaluation" to Process Execution and "Last Purchase in FY" to No.
With this setup, any time that "Last Purchase" changes, you'll reevaluate if it's in the current FY.
The only problem with this scenario is that somebody could make a purchase on 12/30 in the current FY so it's set to Yes, and two days later it should be set to No. Using a workflow, there's no way to automatically re-evaluate it when it's stale. The solution to this is to use the "Last Purchase Evaluation" field. When a new FY comes around, you'll need to reset it. So on 1/1 (ish), you'd do an Advanced Find for contacts where the "Last Purchase Evaluation" was earlier than the FY, and the "Last Purchase" was before the FY, and bulk edit them to set Last Eval = Today and Last Purchase = No. You could also run the workflow on contacts where the last eval was prior to the FY begin - that'll be safer because the logic is built in to the workflow, but it'll take a lot more time because you'll have to kick it off on a batch of records and sit and wait for them all to finish.
Anyway, this should meet your needs.
Hope this helps! I'd really appreciate if you'd mark these answers as Answering your question.
Thanks,
Aiden