Hi!
I'm trying to filter records, which are displayed, when selecting related record. This is not a filter, like usual filter on front-end with checkbox, but filter which is used in addition to all other filters, when making select query to DB. I tried to use complex expression in "where" propery of entityDefs with no luck. Then I tried to read more docs, but I got even more confused. Can someone guide me how to resolve this issue?
This is my complex expression (primaryTeamId is varchar field of current entity)
I'm trying to filter records, which are displayed, when selecting related record. This is not a filter, like usual filter on front-end with checkbox, but filter which is used in addition to all other filters, when making select query to DB. I tried to use complex expression in "where" propery of entityDefs with no luck. Then I tried to read more docs, but I got even more confused. Can someone guide me how to resolve this issue?
This is my complex expression (primaryTeamId is varchar field of current entity)
PHP Code:
"assignedUser": {
"required": false,
"readOnly": false,
"where": {
"IN": {
"whereClause": {
"id=s": {
"from": "TeamUser",
"select": ["userId"],
"whereClause": {
"deleted": false,
"teamId": "{primaryTeamId}"
}
}
}
}
}
},
Comment