If your view contains a data region the field values of the current record can be accessed in script via the record object. In the following example the value of the record object determines whether or not an HTML block is displayed. The HTML block
will be displayed only if the current user is the owner
of the record:
<ws:htmlblock visible="#user.name == record.ownedBy#">
Note that the values of the record object are available after the ws:dataregion tag to the end of the page.
References to the record object made before the ws:dataregion tag will return undefined. Also, the record object has values only for those fields which have corresponding ws:field tags within the data region. I.e., for record.someField to return a value, the data region must contain: <ws:field name="someField" />.
Also, the record object can be used in the following attributes of the ws:dataregion tag: