view.addField( schema-name as String, view-name as String, field as element(view.field) ) as null
This function adds a field to the named view.
Parameters | |
---|---|
schema-name | The name of the schema. |
view-name | The name of the view. |
field | The field element to be added to the view. |
const view = require('/MarkLogic/views'); view.addField('main', 'employees', view.field('Employee')); // Adds the "Employee" field to the "employees" view.