CMIS Connector 25.1
CMIS Connector Help

# getValuesByPath

The `getValuesByPath` method gets the values of a sub-field, specified by path.

## Syntax

    getValuesByPath( path )

## Arguments

Argument | Description
--- | ---
`path` | (string) The path of the sub-field.

## Returns

(Strings). Strings that contain the values. To map the return values to a table, surround the function call with braces. For example:

    fieldvalues = { myfield:getValuesByPath("subfield/anothersubfield") }

## Example

Consider the following document:

    <DOCUMENT>
      ...
      <A_FIELD>
        <subfield>
          <anothersubfield>one</anothersubfield>
          <anothersubfield>two</anothersubfield>
          <anothersubfield>three</anothersubfield>
        </subfield>
      </A_FIELD>
      ...
    </DOCUMENT>

The following example demonstrates how to retrieve the values "one", "two", and "three" from the sub-field `anothersubfield`, using a LuaField object representing `A_FIELD`:

    local field = document:getField("A_FIELD")
    local values = { field:getValuesByPath("subfield/anothersubfield") }

Copyright 2024 Open Text
Version 25.1 | Last updated January 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery CMIS Connector 25.1

Topic Title: getValuesByPath