getCollectionEnumFieldItems

function getCollectionEnumFieldItems(
   dataSourceProxy, 
   dataItemProxy, 
   fieldName): DataItemProxy[]

Extracts DataItemProxies from a collection enum field by field name/ID.

Key handling logic:

  • For simple keys (single field primary key): Accepts single values or arrays of values
    • Single: fieldValues = 'user1'
    • Multiple: fieldValues = ['user1', 'user2']
  • For composite keys (multi-field primary key): Uses schema detection to differentiate
    • Single composite: fieldValues = ['John', 'Smith']
    • Multiple composite: fieldValues = [['John', 'Smith'], ['Jane', 'Doe']]

Parameters

ParameterTypeDescription
dataSourceProxyDataSourceProxyThe data source containing all collections
dataItemProxyDataItemProxyThe data item to extract the field from
fieldNamestringThe name/ID of the field to extract

Returns

DataItemProxy[]

Array of DataItemProxies from the first referenced collection, or empty array if not found