Using ng-admin, I have a referenced_list defined as follows against my companies entity to display all the events registered for a company:
nga.field('companyevents', 'referenced_list') // display list of related profiles
.label('Company Events')
.targetEntity(companyEvents)
.targetReferenceField('companyid')
.targetFields([
nga.field('eventid')
])
.perPage(10)
.listActions(['edit']),
The target field 'eventid' is itself a reference to an event with an event name. Is there any way I can lookup the event name, rather than just showing the eventid which is pretty meaningless on its own? (E.g. some kind of lookup from a map() call?) When I'm displaying a list view, I can access the event name easily using a reference field:
nga.field('eventid', 'reference')
.label('Event')
.targetEntity(events)
.targetField(nga.field('eventname')),
Is this working?