Filtering Subforms

erugalatha
Member Posts: 120
Hi,
I've added a subform for comments to the Service Order main form. This form already contained a subform for Service Item Lines.
I now want to filter my comments subform based on what line is selected in the Service Item Lines subform?
i.e. I'm filtering my second subform on the item selected in the first subform.
I want to only show comments that are entered for each service line item.
Is it possible to do this?
Thanks for any help.
I've added a subform for comments to the Service Order main form. This form already contained a subform for Service Item Lines.
I now want to filter my comments subform based on what line is selected in the Service Item Lines subform?
i.e. I'm filtering my second subform on the item selected in the first subform.
I want to only show comments that are entered for each service line item.
Is it possible to do this?
Thanks for any help.
0
Answers
-
You can't use a subform inside a subform ... at least not without some tricks.
Here are some examples:
Multiple Subform Sample v2.0
New Multiple Subform SampleNo support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Hi Luc,
Sorry for confusion - the service item subform and the comment subform are both on the main service order form - they are not one inside the other.
When I select a service item in the service item subform I want to filter the comment subform to only show comments that apply to the currently selected service item.
It's difficult to explain.0 -
create the subform with item lines first.
in this form create a subform with the comment lines
then create the mainform and put the first subform in it.
It is not recommended by Navision, but it should work0 -
ok thanks for replies. romans multiple subform is what I'm trying to do.
In his subform for SalesLines he has defined a function called IsSelectedLineChanged and in the code of the OnTimer in his main form he has the following:
// Check if the user has scrolled headers or subform lines.
IF NOT CurrForm.SalesLines.FORM.IsSelectedLineChanged THEN
// Don't do anything if the subform line is still the same as //<TimerInterval>ms ago.
EXIT;
I've done the same in my forms and code but I get the error when I compile:
"You have defined an unknown variable.
IsSelectedLineChanged
Define the variable under 'Global C/AL Symbols'."
It's like the function IsSelectedLineChanged is not visible (in scope) from the mainform.
Anyone some ideas what I'm missing?0 -
erugalatha wrote:It's like the function IsSelectedLineChanged is not visible (in scope) from the mainform.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
yup ... that's where I have it defined.
Compiler seems to think it's a variable.0 -
IF NOT CurrForm.SalesLines.FORM.IsSelectedLineChanged THEN
Did you assign a name to your subform? Did you use this name in the above statement?No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Yes, I called my subform 'ServItemLineSubForm' and my code is as follows:
// Check if the user has scrolled headers or subform lines.
IF NOT CurrForm.ServItemLineSubForm.FORM.IsSelectedLineChanged THEN
// Don't do anything if the subform line is still the same as <TimerInterval>ms ago.
EXIT;0 -
Check if your function has the Local-property set to <No>?
See with <F5> if you can locate your function by navigating through CurrForm -> Controls -> <nameofyoursubform> -> Functions -> FORMNo support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
That was it Luc ... local set to No
Thank you.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