I have Room (roomID column) and a Key (with keyID, roomID, and keyDescription columns) . A room can have multiple keys. I setup a one to many relationship between the Room and a Key using the roomID.
I used the Room record to populate a gridField. The search is not returning anything if I put an information that should match the keyDescription. I have the code below. I am only after for keys that are active which is one active key per room. Even if I remove the filter in the code, it does not return anything. Is this expected for a One to Many relationship?
{ a!gridField( data: a!recordData( recordType: <room_record>, relatedRecordData: a!relatedRecordData(relationship: '<roomRecord-keyRecord>', filters: { a!queryFilter( field: '<keyRecord.isActive>', operator: "=", value: true ) } ), columns: {
a!gridColumn( label: "Room ID", sortField: 'roomRecord.roomID', value: fv!row['roomRecord.roomID'], ),
a!gridColumn( label: "Key Description", sortField: 'roomRecord-keyRecord.keyDescription', value: fv!row['roomRecord-keyRecord.keyDescription'], ))}
Discussion posts and replies are publicly visible
I may be wrong, but the search only works on fields configured in the record object list, not the grid you make on interfaces. I suggest you look into the record object and see if your key description field is on that list.
Hi Joshua, thanks for the reply. Search should work even if the fields are not in the list. I have another app with Many to One relationship and search is returning the results of the related fields even if they were not included in the list defined in the record.
I tried your suggestion just to make sure. Still not finding a match.