I have four tables; Event, Parish, Parish Profile and Parish Event.
I want to display in the Parish Profile Record List the latest Event the Parish signed up for.
I currently use an expression rule to display this value in the column.
However, i can't sort and the filter i wrote pulls all Parish Profiles with that has the event in its relationship. in other words, if a parish participated in the 2024 and 2025 events, the profile will show in the list if i filter for 2024.
I tried to create a custom field, but evidently you can't use a one to many relationship.
I tried to create a view in the DB and a CDT that points to the view and a record type that points to the CDT, but you can't create a relationship to a record type that points to a CDT.
Any help or direction would be most appreciated.
Discussion posts and replies are publicly visible
Your subject makes me thinking about the relatedRecordData parameter in a!queryRecordType. Reading further ... not sure anymore. But did you check this?
Use this in the Column in the Record List?
Not sure what you mean. First, querying data for each cell in a grid is a questionable design decision in terms of performance. Second, you can do any kind of query, filter and sort to get the data to display.
I'm not so sure what you were referring to in your initial reply.
Do you mean to use the a!relatedRecordData parameter in a a!queryRecordType in the filter?
This is the current filter, but it doesn't quite work the way i need. Are you suggesting i use the queryRecordType in stead of the querFilter in the filter?
a!localVariables( local!events: rule!PMSO_getEventforLU(), /** this returns a map **/ a!recordFilterList( name: "Latest Event", options: a!forEach( items: local!events, expression: a!recordFilterListOption( id: fv!item.eventId, name: fv!item.event, filter: a!queryFilter( field: 'recordType!PMSO Parish Profile.relationships.parishEvent.fields.eventId', operator: "=", value: fv!item.eventId ) ) ) ) )
OK. I was not aware that this is in context of a record user filter. I think this might be a case for a custom record list implementation where you have the freedom to do such things.