rbf_setFieldValue()

Warning: Support for using this method with external objects (such as those mapped to external tables, to OpenEdge Service objects, or through a HDP connection) is a beta feature. This method is supported in production systems, except for external objects.

Purpose

This function sets the value of a field on current page with a given integration name. It will run the field's onchange event handler if there is event handling code attached to that event. For fields that contain values for different languages, pass a langCode value in the options parameter to set the value in a specific language. To set the value in the tenant's base language, do not use the options parameter.

Syntax

rbf_setFieldValue(fieldname, value, options)

Parameters

fieldName

The integration name of field to set

value

Value to set

options

An optional JSON object that sets the values of optional arguments. Currently this is only used for setting langCode to a valid two-letter ISO language code, for example, {"langCode":"es"}.

Note: This API is supported in portals as well.

Example

The following example sets the French value of the field with the integration name name:

rbf_setFieldValue("name", "Cafétéria", {"langCode":"fr"});