Parsing Data from Complex Fields

Parsing Data from Complex Fields

This documentation is for Kyvos 2026.2.x. To view documentation for other Kyvos versions, click here.

This documentation is for Kyvos 2026.2.x. To view documentation for other Kyvos versions, click here.

Applies to: Kyvos Reporting


Kyvos Reporting supports extracting values from complex data stored within a single field using functions under the Formula tab. You can parse and derive values from fields containing:

  • XML

  • CSV

  • Regular Expressions

  • Fixed-Length Strings

Each type of data format is supported through specific methods, as outlined below.

XML Data

Use getXMLValue() methods to extract values using XPath queries.

Method

<COLUMN_NAME>.getXMLValue(String xPathQuery)

Method

<COLUMN_NAME>.getXMLValue(String xPathQuery)

Returns

String

Usage

FormulaField1 = DATA_XML.getXMLValue("PARAMETERNAME[1]");

Input

<PARAMETER>
<NAME>param1</NAME>
<NAME>param2</NAME>
</PARAMETER>

Output

param1

Method

<COLUMN_NAME>.getXMLValue(String xPathQuery, String defaultValue)

Method

<COLUMN_NAME>.getXMLValue(String xPathQuery, String defaultValue)

Returns

String

Usage

FormulaField1 = DATA_XML.getXMLValue("PARAMETERVALUE", "NONE");

Output

NONE (when XPath query does not match)

CSV Data

Use getCSVValue() and getCSVValues() methods to parse comma-separated or custom-separated values.

Method

<COLUMN_NAME>.getCSVValue(int columnIndex)

Method

<COLUMN_NAME>.getCSVValue(int columnIndex)

Returns

String

Usage

FormulaField1 = DATA_CSV.getCSVValue(2);

Input

John,29,USA,302765

Output

29

Method

<COLUMN_NAME>.getCSVValue(int columnIndex, String separator, String enclosedBy, String defaultValue)

Method

<COLUMN_NAME>.getCSVValue(int columnIndex, String separator, String enclosedBy, String defaultValue)

Usage

`FormulaField1 = DATA_CSV.getCSVValue(2, "

Input

`John

Output

29

Method

<COLUMN_NAME>.getCSVValues()

Method

<COLUMN_NAME>.getCSVValues()

Returns

String array

Usage

FormulaField1 = DATA_CSV.getCSVValues();

Output

[John, 29, USA, 302765]

Method

<COLUMN_NAME>.getCSVValues(String separator, String enclosedBy)

Method

<COLUMN_NAME>.getCSVValues(String separator, String enclosedBy)

Usage

`FormulaField1 = DATA_CSV.getCSVValues("

Output

[John, 29, USA, 302765]

Regular Expression Data

Use getREGValue() and getREGValues() methods to extract values using regex patterns.

Method

<COLUMN_NAME>.getREGValue(String regexPattern)

Method

<COLUMN_NAME>.getREGValue(String regexPattern)

Returns

String

Usage

FormulaField1 = DATA_REG.getREGValue("<regex>");

Output

First match from the regex pattern

Method

<COLUMN_NAME>.getREGValue(String regexPattern, int groupIndex)

Method

<COLUMN_NAME>.getREGValue(String regexPattern, int groupIndex)

Usage

FormulaField1 = DATA_REG.getREGValue("<regex>", 7);

Output

Matched value from specified group index

Method

<COLUMN_NAME>.getREGValue(String regexPattern, int groupIndex, String defaultValue)

Method

<COLUMN_NAME>.getREGValue(String regexPattern, int groupIndex, String defaultValue)

Usage

FormulaField1 = DATA_REG.getREGValue("<regex>", 40, "Not Found");

Output

Not Found (if group does not exist)

Method

<COLUMN_NAME>.getREGValues(String regexPattern)

Method

<COLUMN_NAME>.getREGValues(String regexPattern)

Returns

String array

Usage

FormulaField1 = DATA_REG.getREGValues("<regex>");

Output

All matched values as an array

Method

<COLUMN_NAME>.getREGValues(String regexPattern, String groupIndexes)

Method

<COLUMN_NAME>.getREGValues(String regexPattern, String groupIndexes)

Usage

FormulaField1 = DATA_REG.getREGValues("<regex>", "1,3,5");

Output

[value1, value3, value5] from matching groups

Fixed-Length String Data

Use getFLSValue() and getFLSValues() methods to extract data from fixed character positions.

Method

<COLUMN_NAME>.getFLSValue(String fixedLengthPattern)

Method

<COLUMN_NAME>.getFLSValue(String fixedLengthPattern)

Returns

String

Usage

FormulaField1 = DATA_FLS.getFLSValue("2-3,8-11");

Input

1Mr29USJohn

Output

MrJohn

Method

<COLUMN_NAME>.getFLSValue(String fixedLengthPattern, String defaultValue)

Method

<COLUMN_NAME>.getFLSValue(String fixedLengthPattern, String defaultValue)

Usage

FormulaField1 = DATA_FLS.getFLSValue("14-17", "Not Found");

Output

Not Found (if range exceeds data length)

Method

<COLUMN_NAME>.getFLSValues(String fixedLengthPattern)

Method

<COLUMN_NAME>.getFLSValues(String fixedLengthPattern)

Returns

String array

Usage

FormulaField1 = DATA_FLS.getFLSValues("-1:2-3,8-11:4-5:6-7");

Output

[1, MrJohn, 29, US]

Copyright Kyvos, Inc. 2026. All rights reserved.