Hi All...
Here are the set of questions:
1) If I apply SETRANGE on a field and then again apply SETRANGE for some other value on the same field, what would happen?
2) If I apply SETRANGE on a field and then apply SETFILTER for some other value on the same field, what would happen?
3) If I apply SETFILTER on a field and thena apply SETFILTER for some other value on the same field, what would happen?
4) If I apply SETRANGE on a field and then apply SETRANGE on some other field of the same record set, what would happen?
Thanks.. Have a nice day!
Amita
0
Comments
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I think that if You apply 2 filters on the same field, the second one will override the first one.
Linkedin Profile: http://in.linkedin.com/in/dhanrajbansal
1)When you apply 2 filters on the same field (no matter if you use SETRANGE or SETFILTER), the second one will override the first one.
So if you use code like this (for table 17) the result will be 12 000.. 25 000 (the last filter used on that field)
You can try it by using after setting that filters.
2) and 3) is same as the 1), you are just using different statements for setting filters
4)For this case you will get an intersection of filters (like DRB wrote)
Could not understand... :-k
If you set filters on two different fields in record set (let say, table 17), as a result, you will get an intersection of those two filters.
Or more clearly:
If you use code like this: then the result are all the entries with number from 10000 to 20000
If you have code like this: then the result are all the entries with number from 10000 to 20000 where Posting Date is in last year (01.01.2006-01.01.2007).
With first filter you are selecting entries based on their Entry No. and with that other filter you are selecting some entries from allready selected range (10000..20000).
It's like having two fields: Char and Num and table looks like this
Char Num
A 1
A 2
A 3
A 4
B 1
B 2
B 3
B 4
C 1
C 2
C 3
C 4
After result is:
Char Num
B 1
B 2
B 3
B 4
and result after is:
Char Num
B 1
B 2
Hope it is a little bit more clear now.