Functions Index
The following table lists the default functions which come predefined. You may extend these using the Functions app.
A detailed description of each function is listed in the following section.
Functions List
Name | Description | Category |
---|---|---|
ADD | Add two numbers together | Math |
ADD_TIME | Add (or subtract) minutes to a datetime | Date |
APPLY_VALUES | Applies source values to data for the target data types | Logical |
APPROVE_TIMECARD | Call the approve timecard plugin for an employee and paydate/period | Plugin |
ARCHIVE_DATA | Archive rows in the target table based on a source record and date field. All rows matching the source data and having the date column greater than the provided date value will be marked as archived | Database |
ATTRIBUTE | Returns the child attribute of an object. | Logical |
BACKUP | Perform system backup | Database |
BEST_FIT | Find the best fit match in a related store (e.g. finding schedules, leave or other transactional items) | Database |
BEST_FIT_ITEMS | Find the best fit match in a child store (e.g. finding rates, status, other demographic items) of a looked-up parent store | Database |
CALC | Return a calculated value from the rules engine, such as week-to-date hours, number of breaks taken, length of a break | Calculated |
CALCULATE_PAYCHECK | Call the payroll plugin to calculate a single check | Plugin |
CALCULATE_TIMECARD | Call the calculate timecard plugin for an employee and paydate/week | Plugin |
CAPITALIZE | Capitalize the first letter of a word or string | String |
CODE | Execute a script | Logical |
COVERAGE | Compares worked time to scheduled time and returns the amount of coverage | Analytics |
CREATE_LINK | Create a link/URL to an application or form | Logical |
CREATE_PAYBATCH | Call the payroll plugin to create a new payroll batch | Plugin |
CREATE_RECORD | Create a record from a list of values | Logical |
CURRENT_RECORD | Returns the current record | Logical |
CURRENT_TIME | The current time in the users timezone | Date |
CURRENT_TIME_STR | The current time as a string in the users timezone | Date |
DATETIME_TO_STR | Convert a datetime object to a string | Date |
DATE_DIFF | Difference between two dates in days, when the inputs are dates | Date |
DATE_DIFF_STR | Difference between two dates in days, when the inputs are string | Date |
DATE_LIST | Return a list of dates using the provided options | Date |
DATE_TO_STR | Convert a date object to a string | Date |
DAY_OF_WEEK | Returns the day of the week (1=Sun, 2=Mon, .. 6=Friday, 7=Saturday) | Date |
DIVIDE | Divide one number by another | Math |
EMPLOYEE | A helper function which calls FIND() with the "employee" datasource prefilled; allows fetching any attribute from the employee store | Database |
ENDSWITH | Determine if a string value ends with a letter or phrase | Logical |
EQ_STR | Test if two string values match | Logical |
EVENT | Creates an event/calendar record from date and times | Date |
EVENT_ALLDAY | Extracts the allday status of the event (1/0) | Date |
EVENT_DURATION | Extracts the duration of the event in hours | Date |
EVENT_END | Extracts the ending datetime of an event | Date |
EVENT_START | Extracts the starting datetime of an event | Date |
FETCH_RECORDS | Fetch rows from a table | DB |
FETCH_RECORDS_BY_FILTERS | Fetch rows from a table using a list of filters | DB |
FETCH_RECORDS_BY_RANGE | Fetch rows from a table using a range of values | DB |
FETCH_RECORD_BY_ID | Fetch a row from a table | DB |
FIND | Lookup fields in related datasources (e.g. lookup an employee's attributes when processing a timecard) | Database |
FINDMANY | Lookup fields in related datasources which contains multiple rows (e.g. lookup an employee's schedule when processing a timecard) | Database |
FIND_BY_GEO | Find the best fit match to a geo location, such as a list of store or job locations. Uses the Great Circle Distance formula to calculate the surface distance between points. | Database |
FIND_IN_ITEMS | Find the parent record which owns a child value; can return a specified field from the owning parent or the entire record | Database |
FLOOR | Round a decimal value down to an integer; negative values round downward (greater negative) | Math |
FORMAT_DATE | Convert a date from one format to another | Date |
FORMAT_DATETIME | Convert a datetime from one format to another | Date |
GREATER | Return the larger of two numbers | Math |
IF | Tests if the first argument is set (1/true) and if so, returns the second argument, else the third | Logical |
IF_EQUAL | Test if two values are equal, and if so return one argument, else return another | Logical |
INSERT_MONEY | Inserts or updates a system generated timesheet entry (e.g. for meal penalty); handles updating, deleting. No hours component is included | Database |
INSERT_PREMIUM | Inserts or updates a system generated timesheet entry (e.g. for shift premium); handles updating, deleting. Allows automatic generation of overtime calculations on the premium rate | Database |
INSERT_PUNCH | Inserts or updates a system generated timesheet entry (e.g. for Holiday); handles updating, deleting | Database |
INT | Return the integer portion of a number | Math |
ISALPHA | Tests if a string contains all alpha characters | Logical |
ISNUMERIC | Tests if a string contains all numeric characters | Logical |
IS_ARCHIVED | Test if the current record is archived | Database |
IS_HOLIDAY | Returns True (1) if the provided date is a holiday | Date |
IS_SET | Test if an item has a value; 0, False, None, null and such would return 0, everything else 1 | Logical |
IS_UNIQUE | Tests to see if a value in a data store is unique | Database |
LIMIT | Limit a number to be within the provided range; if less than the minimum, return the minimum, or if greater than the maximum return the maximum | Math |
LOOKUP | Lookup a value in a non-related table or datasource. | Database |
LOWER | Convert a string to lower case | String |
LSTRIP | Strip characters from the left side (start) of a string | String |
MULTIPLY | Multiply two numbers together | Math |
NOT | Flip a logical value to its opposite (e.g. 1->0, False->True) | Logical |
NOW | Current datetime | Date |
NOWSTR | Current date and time as a string | Date |
OCCURRENCES | Count the number of occurrences of an event during a timeline. For example, the number of breaks taken during a shift, or segment of time. | Calculated |
OR | Returns the first argument with a value; 0/None/False equate to no value | Logical |
PART_OF_DAY | Return a description of the part of the day (morning, afternoon, evening) | Date |
PUNCH | Returns a punch attribute from the current day by specifying which punch ("First", "Last", "Any") and the attribute to return | Database |
PUNCH_ACTION | Returns an attribute of the related punch action (e.g. Description = "IN", "OUT", "Start lunch", "End lunch"..). This is simply a shortcut to calling the FIND() function. | Logical |
PURGE | Purge records from table (data will be physically removed) | Database |
REMOTEIP | The remote (public) IP address of the current request (only valid when used in a Form Submit type workflow) | Request |
REMOVE_RECORD | Remove a record from a table (archive) | DB |
REPLACE | Substitute characters in a string | String |
ROUND | Round a number to the desired number of decimal places | Math |
ROUND_DATETIME | Rounding of a date and time to nearest minutes interval | Date |
RSTRIP | Strip characters from the right side (end) of a string | String |
RUN_IMPORT | Run an import on demand | External |
SAVE_RECORD | Save a record to a table | DB |
SCHEDULE | A helper function which calls the FIND function to return a schedule attribute (e.g. StartTime, StopTime..) | Database |
SEND_EMAIL | Sends an email | Plugin |
SEND_SMS | Sends a SMS/text message | Plugin |
SEND_USER_INVITE | Send a message to a new user with invite instructions to login. | System |
SET_ATTRIBUTE | Sets the child attribute of an object. | Logical |
SET_EXCEPTION | Sets an exception on the underlying data. Use the Code from the Exceptions list to specify the exception to set | Logical |
SET_PASSWORD | Set a user's password to a new value | Security |
SLICE | Return a substring of the value from a start offset to an end offset | String |
SPLIT | Split a string into components using a delimiter | String |
STARTSWITH | Determine if a string value starts with a letter or phrase | Logical |
STRIP | Remove all leading and trailing spaces from a string | String |
STR_TO_DATE | Convert a string to a date object | Date |
SUBTRACT | Subtract one number from another | Math |
SUBTRACT_TIME | Subtract minutes from a datetime | Date |
SUM_BY_DATE | Sum a list of numbers in a datasource by date range | Math |
SUM_TO_CURRENT | Sum a list of numbers in a datasource up to the current row using a startdate | Math |
TEST_PASSWORD | Testa user's password to confirm it matches the password policy | Security |
TIME_DIFF_HOURS | Returns the difference in two input times in hours | Date |
TIME_DIFF_MINUTES | Returns the difference in two input times in minutes | Date |
TITLE | Capitalize the first letter of each word in a string | String |
TODAY | Today's date | Date |
TODAYSTR | Today's date as a string | Date |
UNANET_DISAPPROVALS | Retrieve disapproved timesheets | Plugin |
UNANET_POSTTIME | Post a timesheet pair, worked hours or other non-working hours to a Unanet timesheet | Plugin |
UNANET_SUBMITTIME | Submit a completed timesheet for a payperiod | Plugin |
UNAPPROVE_TIMECARD | Call the unapprove timecard plugin for an employee and paydate/period | Plugin |
UPDATE_LEDGER | Updates a balance ledger with current transaction details. | Database |
UPPER | Convert a string to upper case | String |
VALID_PASSWORD | Confirm a user's password to authenticate | Security |
WORDSLICE | Return a substring of words from a start offset to an end offset | String |
ZFILL | Pad a string with leading zeros | String |