system.kanoa.utilities.getFieldValue
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)- 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').
- 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)