Mobile Workflow Utility Functions

Methods that allow you to access the Mobile Workflow utility functions.

All of the Mobile Workflow utility functions are synchronous.
Method Description
getDateString(date) Returns a string representation of the specified date (currently in yyyy-mm-dd format only).

date – the specified date.

getDateTimeStringToDisplay(datetime, precision) Returns a string representation of the specified date with the specified precision (currently in yyyy-mm-ddThh, yyyy-mm-ddThh:mm or yyyy-mm-ddThh:mm:ss format only, depending on the precision string (HOURS, MINUTES, SECONDS)).
  • datetime – the specified datetime.
  • precision – (optional) the specified precision, determines the precision used when rounding.
getDateTimeStringForXMLMessage(datetime) Returns a string representation of the specified date in yyyy-mm-ddThh:mm:ss format.

datetime – the specified datetime.

getDateFromExpression(toolingStr) Returns a date for the specified string, which must be either a string representation of a date or of the form “today” or “today+d” or “today-d”, where d is a number of days.

toolingStr – the date as specified in the Mobile Workflow Forms editor.

parseBoolean(value) Returns true if the specified string is equal, in a case-insensitive way, to true.
parseDateTime(value) Returns a date that corresponds to the specified string.
convertToSUPType(htmlElement, typeAttribute) Returns the XmlWorkflowMessage type for the given HTML element.
  • htmlElement – the specified HTML element.
  • typeAttribute – the type of the specified HTML element.
getHTMLValue(htmlElement, typeAttribute) Returns a string representation of the specified HTML element’s value.
  • htmlElement – the specified HTML element.
  • typeAttribute – the type of the specified HTML element.
setHTMLValue(htmlElement, value, screenName) Sets the value of the specified HTML element from the specified string representation of the value.
  • htmlElement – the specified HTML element.
  • value – the new value.
  • screenName – the screen on which the HTML element appears.