Wednesday, April 09, 2008 6:06 PM
steveny
Utilities Services
Hi All
So just a quick overview of the Utilities Functions Smart Objects (download then here) and how to use them.
There are two ways of using the functions - either with input properties or with input parameters.
There are a few Key properties that need to be clarified:
DateTime Functions
- AdditionPart: used in the DateAdd function - possible values "day", "month", "year", "hour", "minute", "second" ie which part do you want to add to.
- Value: used in the DateAdd function - the positive or negative integer to be added to the date
- DateComparison: used in the DateCompare function - This is the return value and will have 1 of the 3 values "Same", "Later", "Earlier"
- Format: used in the FormatDate function - accepts the same types as the C# format eg hh MMM yyyy hh:mm:ss tt
there are also some functions that need a little explanation:
String Functions
- ConcatWithString: the property separator is the string which will be inserted between the two strings to be concatenated. for spaces not to be trimmed from your separator the separator must be encapsulated in square brackets eg "[ - ]"
So with that explained let us see where it might be useful. Scenario 1
Let’s get the expected Duration of an activity and subtract 2 hours from that value then use it as the escalation.
For this example we have to use 2 method calls:
1. ToDate (this is in the Convert functions SmO) – because expected duration is a string
2. DateAdd (this is in the DateTime functions SmO)
First: Add the Expected Time

Second: Create an Escalation on a Dynamic Date

Three: Perform First Function (this is nested so it is actuallt the last function ... the add date)

Four: the second function ... the Convert - without this function you could not drag the expected duration into the dateadd property as the types do not match

Finally: select the Expected Duration

As you can see by nesting these very simple function you can very easily extend the functionality of the product without having to drop into code.
I hope this was helpful !
Have fun
Steve