Hi,
Looking through the online help, and browing the community, I suspect the answer is "no", but is it possible to add a simple UDF to a workflow that all users of the workflow would have access to?
This is akin to adding a simple VBA function in an Excel spreadsheet.
The online help suggests that it is possible to build something in XML, but would have to be "saved" to each users local machine individually.
My company structure uses remote VDI machines so staff don't have access to a local "C:\" drive to carry this our.
In my workflow, I'm having to adjust the persons retirement dates depending whether the birthday was a leap year, and/or the retirement date(s) is also a leap year and depending on their gender.
I've worked around the problem by adding 2 additional columns that give a boolean response to the "is the input date a leap year", and then referencing the new columns before deselecting them in the next tool.
As I've had to use the same core code, albeit referending different columns, to generate 2 new columns, this seems a bit of unnecessary duplication.
Similar comments to the "if male add 65 years to a date, or 60 if female". If this were in VBA I'd probably add this simple code into another UDF to tidy things up!
Thanks in advance,
Solved! Go to Solution.
Once this macro is built, add it to shared directory that all users have access to. Then get the users to configure that path in the Macros tab of User Settings.
Any macro placed in this path will then become available to all users. My image is taken from my home computer, so it shows the drive letter, but you can use a UNC path here as well.
Dan
This kind of makes my head hurt - I feel like you could do this entire thing in one formula tool and it would be much faster and cleaner. You can use the %j to see the number of days in a year. You could do something like:
you can test if something is a leap year with datetimeformat(todate(tostring(datetimeyear([SPD]))+"-12-31"),"%j")="366"
you can test if you are looking for 2/28 or 2/29 by see if datetimeadd(todate(tostring(datetimeyear([SPD]))+"-01-01"),59,"DAYS") is 2/29 (like it is in a leap year) or 3/1. if this is 3/1 you subtract a day. But this should be fairly straight forward.
Thanks for all of your help!
Lots of ideas to try in my workflow.
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |