Only by SETFILTER

navuser1
Member Posts: 1,334
Hi All,
Suppose there is a Table – TestX and its fields are
1. Emp Code (Code)
2. Male (Boolean)
3. Adult (Boolean)
And I want to get data from the table TestX if one of the two fiels Field Male OR Field Adult is true.
Is it possible with the SETFILTER Function Without IF ELSE Function?
Thanks..
Suppose there is a Table – TestX and its fields are
1. Emp Code (Code)
2. Male (Boolean)
3. Adult (Boolean)
And I want to get data from the table TestX if one of the two fiels Field Male OR Field Adult is true.
Is it possible with the SETFILTER Function Without IF ELSE Function?
Thanks..
Now or Never
0
Comments
-
Add 4. field which will be "Male or Adult" and into OnValidate of Male and Adult add code
"Male or Adult" := Male or Adult;
Than you can filter on this field...0 -
Thanx for your reply.
No kine , I cann't add any field.
I just want to know is it possible ..... with SETFILTER without IF ELSE.
Because I have found a SETFILTER Syntax where
SETFILTER contains More that two Table Fields.Now or Never0 -
navuser1 wrote:Because I have found a SETFILTER Syntax where
SETFILTER contains More that two Table Fields.
??? Where ???
It is not possible to do it in one loop...0 -
you user
SETFILTER(Male,'%1',TRUE);
SETFILTER(Adult,'%1',TRUE);Sanjeev Kumar Dalela
Technical Consultant
(Dataman Computer Systems P Ltd.)0 -
Yes, but this will filter Male AND Adult, not or... it means BOTH must be true, request is One of them is true... ;-)0
-
kine wrote:navuser1 wrote:Because I have found a SETFILTER Syntax where
SETFILTER contains More that two Table Fields.
??? Where ???
It is not possible to do it in one loop...
selected code
SETFILTER("Branch1 Code","Branch2 Code","Branch3 Code",'<>%1|<>%2|<>%3',LocationRequest,'');
"Branch1 Code","Branch2 Code","Branch3 Code", are the table fields
and LocationRequest is the Variable.Now or Never0 -
Did you tried it? No, it is not working in this way... ;-)0
-
Hi all!
To get data from the table if one of the two fields Male OR Adult is true use this:RESET; IF FINDFIRST THEN REPEAT IF Adult OR Male THEN MARK(TRUE); UNTIL NEXT = 0; MARKEDONLY(TRUE);
I think, using only SETFILTER it's impossible.0 -
PsixoLog wrote:Hi all!
To get data from the table if one of the two fields Male OR Adult is true use this:RESET; IF FINDFIRST THEN REPEAT IF Adult OR Male THEN MARK(TRUE); UNTIL NEXT = 0; MARKEDONLY(TRUE);
I think, using only SETFILTER it's impossible.
BUT!!! Do not use this solution if you have thousands and millions of records in the table... [-X0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions