Supplemental Text Functions
In addition to using the functions in the text functions list, you can enter other supported text functions directly in the equation. The following table describes these other functions, where $ always precedes the function name. For example, to return the current date and time, you type $CurrentDateTime(). These functions also work with automatic user-defined calculations.
Function
Function Description
$CurrentDateTime()
Returns the current date and time.
$CurrentDate()
Returns the current date. The time defaults to 12:00:00AM.
$MonthName(x)
Returns the text name of the month. For (x), you supply a date or date/time value in the format specified by your local settings.
$AddDays(date, numberofdays)
Adds the specified number of days to the date.
$AddMonths(date, numberofmonths)
Adds the specified number of months to the date.
$AddYears(date, numberofyears)
Adds the specified number of years to the date.
$AddHours(date, numberofhours)
Adds the specified number of hours to the date.
$AddMinutes(date, numberofminutes)
Adds the specified number of minutes to the date.
$AddSeconds(date, numberofseconds)
Adds the specified number of seconds to the date.
$Case(condition, value, condition2, value2,…)
Returns the value after the first condition parameter that evaluates to true.
$GetNextCounterNumber(CounterName)
Returns the next available number from a counter labeled with CounterName. Windchill Risk and Reliability stores both the counter name and next available number for the counter in an internal table. Each time $GetNextCounterNumber() is called, a new number is generated. All counters start at 1 and always increase by 1. If records are deleted, Windchill Risk and Reliability does not go back and reuse the counters for deleted records. While counters are unique to the System file, they are not unique to a calculation or to a table type. CounterName cannot be blank. If it is, then no value is generated. A counter is not guaranteed to be unique. Situations that can cause a duplicate counter to be generated include:
Multiple users entering data at the same (or close to the same) time.
Resetting the counter after data has been entered.
Manually editing the result field to have a duplicate value.
You can create compound identifiers by concatenating text strings for multiple counters. In other words, you can link multiple counters together in a series or chain. For more information, see Text Function Descriptions.
* 
When designing user calculations, you must be careful not to trigger the calculation multiple times. If this is the case, numbers for counters will appear to be skipped.
$ResetCounter([CounterName])
Erases the counter assigned to the CounterName string. The next time $GetNextCounterNumber() is called with that CounterName, it starts at 1. If CounterName is blank or null, then all counters are reset.
$DisplayCounter([CounterName])
Prints the CounterName followed by the next value to use in the following format: CounterName = N; for example, abc = 5. If CounterName is blank or null, then all counters are printed. For example: abc = 5; count2 = 7; test = 12
Enterprise-only text functions
The following text functions are available only in the Enterprise Edition. They return data stored for the current user. These functions do not return data in the Team Edition because it does not support user login security and permissions. For more information, see the help or guide for Windchill Risk and Reliability Administrator. You can download the latest copy of this guide from the Reference Documents area on the PTC website.
$fullname()
Returns the user’s name as entered for Full name.
$emailaddress()
Returns the user’s email address as entered for Email address.
$company()
Returns the user’s company name as entered for Company.
$phonenumber()
Returns the user’s work telephone number name as entered for Phone number.
$employeeid()
Returns the user’s employee identification number as entered for Employee ID.