Is there any cool grammar like this?
Iory
Member Posts: 4
there are two tables like below:
TableA
field:a,b,c
data:1,2,3
2,4,5
3,1,1
3,1,2
...
TableB
field:a,d,e
data:1,1,5
1,2,2
2,1,4
2,2,5
...
TableA's primary key is field a,TableB's primary key is field a+d,TableA's field a is the same to TableB's field a;
I set two Rec: recTableA,recTableB
I want to get these records from tableB,they accord with the rules below:
1,field a in TableB is the same to TableA,after:recTableA.setfilter(b,'>=2');
How can I code it,with out "Repeat" ?
If there is any grammar like this:recTableB.setfilter(a IN recTableA.a);?
TableA
field:a,b,c
data:1,2,3
2,4,5
3,1,1
3,1,2
...
TableB
field:a,d,e
data:1,1,5
1,2,2
2,1,4
2,2,5
...
TableA's primary key is field a,TableB's primary key is field a+d,TableA's field a is the same to TableB's field a;
I set two Rec: recTableA,recTableB
I want to get these records from tableB,they accord with the rules below:
1,field a in TableB is the same to TableA,after:recTableA.setfilter(b,'>=2');
How can I code it,with out "Repeat" ?
If there is any grammar like this:recTableB.setfilter(a IN recTableA.a);?
0
Comments
-
"TableA's primary key" means "the primary key of TableA"!0
-
Unfortenately, Navision has no SQL syntax. So you can't use this in Navision.
Your problem is in Navision impossible to solve without a "repeat"
You need a loop or to go through every record to solve this problem.
In a report you might add only one dataitem, being TableB. In the onaftergetrecord trigger, you could test to see if this value is present in TableA. If so place a boolean variable to true, else false. In the onpresection trigger of the dataitem body, you could add currreport.showoutput(<<the name of the boolean variable>>) to show or hide the required record.0 -
Thank you for your answer,I'll try your suggestion~0
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
- 323 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