Access to a variable from a subform
 
            
                
                    Guga84                
                
                    Member Posts: 24                
            
                        
            
                    Hi, I’m modifying the Purchase Quote form. I have added a new tab (subform) that is linked with the Purchase Quote table with the “No.”, I’ve done that with the subFormLink property, no problem.
Now, I need to filter this tab with the current Purchase Quote “No.” to use in some functions inside the subform, but I don’t know how to do it.
I don´t know how the subform can access to the current Purchase Quote “No.”.
So the problem could be sump up in access the current variable from a subform.
Any idea?
I’m thinking in mark options or use a “global variable” in a temporally table, but I hope there are better solutions.
Thanks.
                Now, I need to filter this tab with the current Purchase Quote “No.” to use in some functions inside the subform, but I don’t know how to do it.
I don´t know how the subform can access to the current Purchase Quote “No.”.
So the problem could be sump up in access the current variable from a subform.
Any idea?
I’m thinking in mark options or use a “global variable” in a temporally table, but I hope there are better solutions.
Thanks.
0                
            Answers
- 
            If the source table from the subform has the linked field in the clustered index the value is auto-populated.
 If that does not work you can create a function in the subform to pass the number.
 Give the Subform a name in the properties and you can access the function.0
- 
            Mark Brummel wrote:If the source table from the subform has the linked field in the clustered index the value is auto-populated.
 I don't understand that sentense, so I choose the second solution and it works.
 Thanks.0
- 
            Sorry, I am talking SQL.
 Every table has a primairy key. When one of these fields is in the linked view that value will be automaticaly filled when a new record is created.0
- 
            Take a look at the lines subform for an example. Open the quote form in the form designer, select the lines subform and open the properties page. What you are looking for is the SubFormLink property.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
- 322 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

