How can I Filter a dataset with fields from 2 tables.

bindcn
Member Posts: 3
Hello,
I am a newbie on NAV. Would like to ask for your expertise.
Created a form with a TableBox control. also set a table name "A" as its 'SourceTable' properties, in the TableBox I also add 2 fields " B1,B2" which from Table "B", It's OK,but user want to filter the data with B1.B2, Now question is: I can get the filter string from user by a "Dialog" windows , but how can I filter the data? Becuase the variable 'REC' is subjec to table A, it has no the B1,B2 fields.
Thank you.
I am a newbie on NAV. Would like to ask for your expertise.
Created a form with a TableBox control. also set a table name "A" as its 'SourceTable' properties, in the TableBox I also add 2 fields " B1,B2" which from Table "B", It's OK,but user want to filter the data with B1.B2, Now question is: I can get the filter string from user by a "Dialog" windows , but how can I filter the data? Becuase the variable 'REC' is subjec to table A, it has no the B1,B2 fields.
Thank you.
0
Answers
-
The easiest way to solve this is to define B1 and B2 as FlowFields in Table A.
Other options (messy, slow, expensive):- Set the filters for B1, B2 in a worksheet style (e.g. like sales price); You need then to modify OnFind and OnNext triggers on the page in order to do the filtering
- create a table as a copy of table a, but include fields B1, B2. use this table as a temporary sourcerecord on the page and fill it with records not regarding filters on B1, B2; Make sure changes to the temporary table are propagated to real table A, and temporary Rec is not used anywhere where real Table A is expected.
1 -
The easiest way to solve this is to define B1 and B2 as FlowFields in Table A.
Other options (messy, slow, expensive):- Set the filters for B1, B2 in a worksheet style (e.g. like sales price); You need then to modify OnFind and OnNext triggers on the page in order to do the filtering
- create a table as a copy of table a, but include fields B1, B2. use this table as a temporary sourcerecord on the page and fill it with records not regarding filters on B1, B2; Make sure changes to the temporary table are propagated to real table A, and temporary Rec is not used anywhere where real Table A is expected.
Many thanks.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
- 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