Control a sum in a subform

ferris
Member Posts: 23
I have a form with a subform: in the subform there is a table box with the column "pond" (decimal).
The sum of "pond" must be 100: how can I control this sum?
I want to check this sum each time user change the master record or close the form.
What are the right triggers?
And how can I create a sum flowfield that sum only the detail row and not all the table?
The sum of "pond" must be 100: how can I control this sum?
I want to check this sum each time user change the master record or close the form.
What are the right triggers?
And how can I create a sum flowfield that sum only the detail row and not all the table?
0
Comments
-
There's many ways to do this depending on the data flow.
1) you can write a function on line table that check the value every time you create/update one line (so check the value on OnInsert/OnModify).
2) you can create a field STATUS on header that sets if that value can be modified on lines and check the values when releasing.
To add a flowfield you need a kee on the Lines table that contains the fields you use to filter the lines.I don't envy anybody who caught up his aim. I travel gladly.0 -
Moreover the key must have Pond as sumIndexField.I don't envy anybody who caught up his aim. I travel gladly.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