I am getting this error "Cannot sort by field [teamMemberId] because it is from a one-to-many record relationship." when trying to apply sort field gridcoloumn
Discussion posts and replies are publicly visible
The code you've shared doesn't logically work. First your value is a count of "MemberId", implying that the value shown on a given cell in the grid will be the total number of MemberIds associated with the "wfmRIDmember" on that row. I assume that would be fine, assuming that's what you want to be showing.
But then, what would sorting by "MemberId" even be expected to do? Each row of your grid has its own set of MemberIds, for one thing, so sorting on those is not meaningful, let alone not possible.
In this case it's probably best to just not add a sort field to the grid column. Not all columns require sortability.
© 2022 Appian. All rights reserved.