Given that in some parts of the world, we are currently in the final month of the fiscal quarter, I thought this would be a great post. I recently was asked if it’s possible figure out what fiscal quarter you’re currently in, using Nintex Workflow.
I thought that this is something people could reuse in any number of workflows, especially Financial sector business processes. Below is a video that talks to the intricacies of putting together the User Defined Action (UDA) and also the workflow that tests it out to make sure it works.
The User Defined Action Design
If you haven’t already seen in past posts, I like labeling my actions and also grouping them into Action Sets so that it makes it easier to minimize and hide functionality. This gives you a more holistic view of the workflow design.
The actual calculation is based on taking the numerical value of the month and subtracting 1 from that so that it is zero-based. We then divide that number by three, and get the value before the decimal point.
0 = First three months (January, February or March)
1 = April, May or June
2 = July, August or September
3 = October, November or December.
Depending on what you consider your first fiscal quarter, you’ll need to set the output variable appropriate.
The workflow design that is downloadable at the bottom of this post is quite simple. There’s no business value for the workflow itself. It’s just a test to make sure the UDA works.
Important Design Points
The User Defined Action has a Regular Expression action as the first action. It is used to extract the numerical Month in the date. In the environment I am using, the date is in a format used in the US – MM/dd/yyyy. So we are pulling all the numbers from the beginning of the date. You need to be aware that if you are in another location, that format for the date may be different. eg. Australia – dd/MM/yyyy. This would require a different regular expression. Probably would require extracting data from the middle of the string. If you’re in that position, take a look at this post : Extract Text from Between Two Text Strings