I have a readonly grid with a record as a source. This record Lets say "Main Record" is having a relation ship with other record - "Related Record". Grid has fields from both records. When Applying filters I want to avoid getting records from "Related Record" which are not active. Lets take below sample data of "Related Record". Relationship is one to Many.
I have applied filter as
a!queryFilter(
field:Main Record.Related Record.Division
Operator: =
Value: "Sports"
),
field:Main Record.Related Record.isActive
Value: true
)
Still I am getting one record in Grid I am expecting no records at all. And the record I am getting is having "Study" in division grid field. How can I get it work. Some how how the first filter is not working as "Sports is there in the relationship field I guess.
Thanks in advance for your attention.
Discussion posts and replies are publicly visible
Do you combine the filters using an AND or an OR?
Its in "And" my filter structure is as below.
filter:a!queryLogicalExpression(
operator "AND"
logicalexpression:"Some Filter in Or Condition",
filters:the above filters with some more filters.
The filter is working fine if I don't have the inactive value in related record like if My data is as follows
Then I am not getting this record, which is expected.
The example in your first post clearly shows a result I would expect when combining the two filters using an OR. I suggest to simplify your filters to identify the issue.
Thanks Stefan, for bringing my focus on operators. It is working now, I had to use "AND_ALL" operator.