Skip to main content

system.kanoa.utilities.getFieldValue

This function requires KanoaCore module

Description

Helper function that returns a scalar value for the passed-in column ('field') from a dataset. Expects there to be 0 or 1 rows in the dataset (kanoaCore).

Syntax

getFieldValue(self, field, data)
  • Parameters
      self (Class Instance) - The instance of the class where this method is defined.
      field (String) - The name of the column for which the value is retrieved, e.g., 'assetGroupName'.
      data (Dataset) - The dataset containing the specified column ('field').
  • Returns
      Object or None (Object) - The scalar value corresponding to the specified column ('field'). Returns None if the column does not exist.
  • Code Example

    # Example Usage:
    value = system.kanoa.utilities.getFieldValue(self, 'assetGroupName', data)