I want to set a filter on the Fixed asset table where the "component of main asset" field is = to blank or is equal to the asset no. Is this possible?
I tried something like this
rFixedAsset.setfilter(rFixedAsset."Component of Main Asset",'%1|%2','',"FA No.");
but this does not work as the field FA No is not found. Is there another method to do this.
Thanks in advance.
0
Comments
A range from A to Z
A | G
A or G
F.. & *A/S
A range from F and A/S is included in the field.
<>B
All except B
<>''
All not blank
<=200 | >500
All less than or equal to 200 or greater than 500
Using a filter with replacement field:
This filter selects all accounts in the range from 100 to 200 and No. 300
"G/L Account".SETFILTER("No.", '%1..%2|%3', '100', '200', '300');
Using a filter entered directly in a string:
This filter, which is entered as a string, corresponds to the previous example. It too selects all accounts in the range from 100 to 200 and No. 300.
"G/L Account".SETFILTER("No.", '100..200|300');
Documentation Feedback
from nav help
http://nav2009.blogspot.com/
Thanks for the info but those examples will not work for what I am trying to do. I am not trying to filter a field for certain values. I need to filter on field according to the value of another field.
In sql terms the where clause would be as follows:
An alternative would be to read all the records in the table and then use an IF STATEMENT to determine if the current record meets that criteria. I would however rather not do that as that would mean that each all the records in the table must be read each time, and that to me is poor design
I would do this to check if the filters you put are correct:
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
The program will not compile because it says that "FA No." is an unknown variable. I do not want to filter on a variable. I need to filter on another field in the table
So I am going to have to resort to reading all the records each time and then using an IF STATEMENT to ignore the records that I dont need