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.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.