Functions - Workflow - English - Foundation 22.1 - OnBase - Premier - external - Standard - Premier - Standard

Workflow

Platform
OnBase
Product
Workflow
Release
Foundation 22.1
License
Premier
Standard

Function

Description

Abs

Returns the absolute of a number.

AddDays

Adds the specified number of days to the date.

AddHours

Adds the specified number of hours to the date/time.

AddMinutes

Adds the specified number of minutes to the date/time.

AddSeconds

Adds the specified number of seconds to the date/time.

AddMonths

Adds the specified number of months to the date.

AddYears

Adds the specified number of years to the date.

Age

Returns the age in years for the specified date relative to the current system date.

Ccur

Converts a value to a WorkView currency value.

CDate

Converts the value to a date/time data type.

CDbl

Converts the value to a double data type.

CDec

Coverts a value to a WorkView floating point value.

Ceil

Returns the smallest whole number greater than or equal to the specified number.

CInt

Converts the value to an integer data type.

Note:

When converting a floating point number value, the value is rounded to its nearest whole number. If a value is non-numeric, it will evaluate to a 0 value.

CLng

Converts the value to a long data type.

Note:

When converting a floating point number value, the value is rounded to its nearest whole number. If a value is non-numeric, it will evaluate to a 0 value.

Compare

Accepts three parameters, and returns a true/false based on the results. The parameters are a value, an operator, and a second value.

ConvWildcardToRegEx

Converts a string containing wildcard characters into a regular expression string.

Tip:

Combine this function with other functions, such as IsMatch, to use the resulting regular expression for evaluation.

Count

Returns the count of elements to determine the number of attribute values that exist on an item for a specified attribute.

The standard formatting for this function is as follows:

Count(Value)

CStr

Converts the value to a string data type.

Date

This function accepts three parameters. Years, Months, and Days. A WorkView date value is then returned.

DateTime

This function accepts six parameters. Years, Months, Days, Hours, Minutes, and Seconds. A WorkView date/time value is then returned.

Day

Gets the day of the month of the specified date.

Decode

This function decodes and HTML string.

Equal

This function accepts two parameters to determine if they are equal. A Boolean value is returned.

FirstFilterResultColumn

This function accepts three parameters.: a Filter, a Column Name, and a Constrain to parent value. If the constrain to parent value is not needed, an empty value ("") may be used.

Floor

Returns the largest whole number less than or equal to the specified number.

Format

Returns a numeric string formatted according to the instructions contained in the format string expression. Supported format strings can be found at the following locations:

http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx

http://msdn.microsoft.com/en-us/library/0c899ak8.aspx

FormatDateTime

Returns a date or time string formatted according to the instructions contained in the format string expression.

Supported format strings can be found at the following locations:

http://msdn.microsoft.com/en-us/library/az4se3k1.aspx

http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx

FormatTemplateFromFile

This function accepts a single parameter. The template name must be fully specified (i.e. - myTemplate.tmp). The template contents are then returned. As an example, this can be used to populate a formatted text field to display a template's contents.

There is only limited support to populate formatted text attributes because only a limited amount of HTML tags are supported by the formatted text control. Supported elements are:

These are the supported styles of text(size):

'p', 'pre', 'blockquote', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'

Lists, images, Text decorations, etc:

['a', 'img', 'b', 'strong', 'sub', 'sup', 'i', 'em', 'u', 'small', 'strike', 'del', 'cite', 'ul', 'ol', 'li']

['strong', 'b', 'u', 'em', 'i', 'code', 'del', 'ins', 'samp', 'kbd', 'sup', 'sub', 'mark', 'var', 'cite', 'small'],

FormatTemplateFromString

This function accepts a single parameter. The template name must identify a file that exists in the WorkView Resources\Templates directory (i.e. - myTemplate.tmp). The template contents are then returned.

GetFilterResultsColumnList

Returns a string built as a list of values separated by the specified separator string. Attribute values are extracted from the results of the named filter, appending all non-null listAttrName values from the filter results. If the constrainByAttr name is not empty, the filter will be constrained on that attribute and the current object's ID as the match value.

GetFilterResultsColumnList(“filtername”, “listAttrName”, “constrainByAttr”, “seperator”)

GetFilterResultsCount

Returns the count of the returned objects in a filter. This function accepts two parameters. The first parameter is the filter name. The second parameter is the name of the attribute you want to use to constrain the filter. It will use the value of the specified attribute associated with the current object to use as the constraint. If no attribute is specified, the filter will be run unconstrained.

GetSequenceFromAttribute

This function accepts a single parameter. A dotted address must be used and the next sequence value used in the specified attribute will be returned.

Note:

This is only supported in OnActivate Aggregates and it is not supported in Live Update.

Hour

Gets the hour of a specified date/time.

IIf

Returns one of two values, depending on the evaluation of an expression.

InStr

Returns a zero-based integer specifying the start position of the first occurrence of one string within another.

InStrRev

Returns a zero-based integer specifying the start position of the last occurrence of one string within another.

IsInDataSet

Returns a Boolean value that indicates whether the passed value is in a Data Set. This function will determine whether the specified value matches a value in the specified attribute's Data Set. The attribute name must be entered in double quotations marks. If the specified attribute is not configured to use Data Sets, NULL is returned and the condition will not be evaluated.

IsMatch

Indicates whether the regular expression finds a match in the specified string.

IsNull

Returns a Boolean indicating if the value contains no data.

Lcase

Converts the string value to lower case.

Left

Returns the first x characters in a string value.

Len

Returns the length of a string value.

LTrim

Removes leading spaces from a string.

Match

Returns the first occurrence of a string that matches the supplied regular expression.

Max

This function accepts two parameters. A child class is first specified, then the relation to the current object is specified, and then an attribute on the child class is specified. The function will return the largest value that relates back to the current object.

Note:

This function will only work with numeric data.

Mid

Returns a substring of a string value.

Min

This function accepts two parameters. A child class is first specified, then the relation to the current object is specified, and then an attribute on the child class is specified. The function will then return the smallest value that relates back to the current object.

Note:

This function will only work with numeric data.

Minute

Gets the minute of a specified date/time.

Month

Gets the month of the specified date.

Now

Returns the current date/time.

NullValue

Clears the value of an attribute and sets it to NULL.

Note:

This cannot be used for comparisons. It can be used in conjunction with the SET class trigger.

PadLeft

Returns a string that is left padded by the specified character for the specified length.

PadRight

Returns a string that is right padded by the specified character for the specified length.

Pow

Returns a specific number raised to the power specified.

Remainder

Produces a remainder value resulting from dividing the source by the divisor.

Replace

Replaces all occurrences of a string that match the regular expression with an alternate string.

The following syntax is used:

Replace( string; regex_pattern; replacement_string; ignore_case)

String is the string you want to replace. regex_pattern represents the part of the string you want to replace. replacement_string is the string of text that will replace the specified string. If you want the string to be case sensitive, enter false for the ignore_case parameter. If you want the string to not be case sensitive, enter true for the ignore_case parameter.

The following is an example:

Replace( "123abc456def"; "[0-9]+"; "xyz"; true )

The resulting text string would be: "xyzabcxyzdef"

Right

Returns the last x characters in a string value.

Round

Returns the number with the specified precision nearest the specified value.

RoundDown

This function accepts two parameters. The first is the number to round, the second is how many decimal places to round. Values will be rounded down.

RoundUp

This function accepts two parameters. The first is the number to round, the second is how many decimal places to round. Values will be rounded up.

RTrim

Removes trailing spaces from a string.

Second

Gets the seconds of the specified date/time.

SecondsFromTicks

Returns the number of seconds (as a decimal value) represented by the specified tick count. Useful for converting the tick-based difference between two dates into a seconds value.

StripHTMLTags

Removes HTML tags from a string. Example:

StripHTMLTag([string])

A string or attribute name that you want to strip HTML tags from can be placed where [string] is located.

If the user enters a tag that is encoded at runtime, using the trigger with the StripHTMLTags function will enter the raw value into the target attribute.

If an element, such as an image or video, is added to a Formatted Text Attribute, when the StripHTMLTags function executes, the image or video will not be displayed in the target attribute.

Sum

Returns the sum of elements. This can be used to calculate the sum of all values for a specified attribute. The function must be able to convert the values to a decimal.

If the specified attribute is not present on the item, the function returns a value of 0.

If the specified attribute contains only a single value, that value is returned as the sum.

Ticks

Gets the number of ticks the specified date represents.

Trace

Logs a message to the trace tab of the diagnostic console. This has two parameters: message and parameter.

The message can contain a {0} and it will place the parameter value in the place of the {0} where it is defined. This will store the parameter in the attribute.

For example, using Trace(“The current date is {0}”; %D) will display “The current date is 03/18/2016” to the console and store 03/18/2016 in the attribute.

Trim

Removes leading and trailing spaces from a string.

Ucase

Converts the string value to upper case.

Weekday

Returns a number that represents a day of the week. The following numbers represent the following days:

0 = Sunday

1 = Monday

2 = Tuesday

3 = Wednesday

4 = Thursday

5 = Friday

6 = Saturday

WeekdayName

Returns the name of a specified day of the week. The function should be formatted as follows:

WeekdayName(DayOfWeek; Abbreviate)

Replace DayOfWeek with the number that corresponds to the day of the week:

0 = Sunday

1 = Monday

2 = Tuesday

3 = Wednesday

4 = Thursday

5 = Friday

6 = Saturday

Replace Abbreviate with either true or false. True will abbreviate the name of the day of the week, and false will return the full name of the day of the week. For example:

WeekdayName(2; true) returns the value "Tue", and WeekdayName(2; false) returns the value "Tuesday".

WeekOfYear

Returns the week of the year that the specified date belongs to. The function should be formatted as follows:

WeekOfYear(Date;CalendarWeekRule;DayOfWeek)

Replace Date with a static date or a supported date macro.

Replace CalendarWeekRule with the number that corresponds to the appropriate calendar week rule:

0 - FirstDay

1 - FirstFullWeek

2 - FirstFourDayWeek

Replace DayOfWeek with the number that corresponds to the day of the week:

0 = Sunday

1 = Monday

2 = Tuesday

3 = Wednesday

4 = Thursday

5 = Friday

6 = Saturday

Year

Gets the year of the specified date.