Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

JsonNode - encodedQueryFor(String tableName)

Log in to subscribe to topics and get notified when content changes.

JsonNode - encodedQueryFor(String tableName)

Specifies that the value of the JSON property is an encoded query for the specified table.

Calling this function on a JSON node tells the proxy that the value is an encoded query for the specified table. The proxy parses the encoded query and encrypts the values for fields in the encoded query that must be encrypted.

Table 1. Parameters
Name Type Description
tableName String A table name.
Table 2. Returns
Type Description

This example is from the REST JSON encryption rule.

function RESTJSONAction(request) {
	var urlArray = request.path.split('/');
    var tableName = urlArray[urlArray.length - 1];
	if (request.urlParams && request.urlParams.sysparm_query) {
	var jsonContent = request.getAsJsonContent();
	for (var jsonElementItr = jsonContent.iterator(); jsonElementItr.hasNext(); ) {
		var jsonElement =;
		jsonElement.valueFor(tableName, jsonElement.getName());