The function ecx:related gets the value for the specified key from the given related data set. The value returned is an object type. This function is frequently used to designate a key column in unlinked related data sets which are then filtered or sorted with one of the ecx:filter functions or ecx:sort.
A related data set named Event Calendar stores event details for various locations. The related data set is not linked to any attribute values.
A newsletter features a calendar of events in London. The function that returns values with the key London is constructed as follows:
${ecx:related('Event Calendar', 'London')}
CODE
ecx:related(string, object)
Parameter | Description |
---|
string | Specifies the name of the related data set. |
object | The value designated as the key. |