XMLElement - valueFor(String tableName, String fieldName)

Specifies that the value of the element maps to the specified field in the specified table.

Calling this method on an element value tells the proxy that the value for this element maps to the specified field in the specified table. The proxy then decides if the field needs to be encrypted.

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

Table 1. Parameters
Name Type Description
tableName String The table name
fieldName String The field name
Table 2. Returns
Type Description
void

This example is from the List Edit encryption rule.

function ListEditAction(request) {
	var xmlContent = request.postParams.sysparm_xml.getAsXmlContent();
	for (var xmlElementIter = xmlContent.getIterator('record_update'); xmlElementIter.hasNext(); ) {
		var xmlElement = xmlElementIter.next();
		var tableName = xmlElement.getAttributeValue('table');
		for (var xmlRecordIter = xmlElement.getIterator('record'); xmlRecordIter.hasNext(); ) {
			var xmlRecord = xmlRecordIter.next();
			for (var xmlFieldIter = xmlRecord.getIterator('field'); xmlFieldIter.hasNext(); ) {
				var xmlField = xmlFieldIter.next();
				var fieldName = xmlField.getAttributeValue('name');
				for (var childIter = xmlField.getIteratorOverAllChildren(); childIter.hasNext(); ) {
					var childElement = childIter.next();
					childElement.valueFor(tableName, fieldName);
				}
			}
		}
	}
}