Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

endsWith(String toMatch)

endsWith(String toMatch)

Determines if the string ends with the specified string.

This method is available only in an Edge Encryption rule action script.

Table 1. Parameters
Name Type Description
toMatch String The string to match.
Table 2. Returns
Type Description
Boolean True if the specified string matches the end of the target string.

This example is from the Vacation encryption rule condition.

function VacationCondition(request) {
	if (endsWith(request.path, '/service_catalog.do') &&
		request.postParams.sysparm_action == 'execute_producer' &&
		request.postParams.sysparm_id == 'c322301653a33100c0eca5f4a11c084d')
			return true;
	return false;
}