It's actually an OR that you are looking for, the AND you get for free: all filter conditions must be fulfilled. And since a filter is always inclusive, not exclusive, what you really need is
FieldA <> '' OR Field B <> ''
NAV does not provide for this. You need a work around.
Some of your options:
a FlowField
A field that you calculate OnInsert/OnModify
MARK(TRUE)/MARKEDONLY(TRUE)
SourceTableTemporary=Yes
Some Code in OnFindRecord/OnNextRecord
a Query object
You can find many posts concerning this sort of requirement in this forum.
if FieldA = blank and FieldB = blank then hide record
any or here but in any case, I agree that OR will not be doable, for OR probably most viable option is OnFindRecord and OnNextRecord triggers. The warehouse shipments are great example of implementation OnFindRecord and OnNextRecord.
repeat
if (NOT yourRecord.fieldA=' ') and (NOT yourRecord.FieldB=' ') then begin
yourRecord2 := yourRecord;
yourRecord2.insert;
end;
until yourRecord.next=0;
RUN(pageID, yourRecord2);
where yourRecord is a Record variable and yourRecord2 is a temporary Record variable of the same table.
Comments
this will show only records, where A and B populated. Of course, depending on your fileds datatypes you have to set right stuff in " ''); "
0 for integers and options, '' for code and text, '0d' for date, 0t for time, etc...
NAV does not provide for this. You need a work around.
Some of your options:
- a FlowField
- A field that you calculate OnInsert/OnModify
- MARK(TRUE)/MARKEDONLY(TRUE)
- SourceTableTemporary=Yes
- Some Code in OnFindRecord/OnNextRecord
- a Query object
You can find many posts concerning this sort of requirement in this forum.I cant see any or here but in any case, I agree that OR will not be doable, for OR probably most viable option is OnFindRecord and OnNextRecord triggers. The warehouse shipments are great example of implementation OnFindRecord and OnNextRecord.
if we do this then either Field A blank or Field B blank then will be filtered
i only want to hide if both fields are blank
repeat
if (NOT yourRecord.fieldA=' ') and (NOT yourRecord.FieldB=' ') then begin
yourRecord2 := yourRecord;
yourRecord2.insert;
end;
until yourRecord.next=0;
RUN(pageID, yourRecord2);
where yourRecord is a Record variable and yourRecord2 is a temporary Record variable of the same table.