Table.SETRANGE(A,true) Table.SETRANGE(B,false)To filter out only B clicked rows:
Table.SETRANGE(A,false) Table.SETRANGE(B,true)To filter out only A AND B clicked rows:
Table.SETRANGE(A,true) Table.SETRANGE(B,true)Here's the question: What about A OR B clicked rows?
Comments
or
Hope it's understandable.
Regards
OnValidate of both of your current fields, you call a function:
NewFunction
FieldC := fieldA OR fieldB;
then you filter on field C, which will contain TRUE if A or B is ever TRUE.
Dynamics NAV Developer since 2005
Filtergroup just hides filters from the user (and other parts of the code).
Generally speaking, you can't have a SELECT statement with an OR in Navision. You have to filter on a field, you can't filter on fieldA = X OR fieldB = Y.
There are ways with temporary tables, looping through the data once for each condition, but this could take a long time depending on how much data you have, and the solution here is a bit simpler.