Calculate field in Header with value of sumindex field

Sjoerd
Member Posts: 13
Hi there,
A simple question for you who know, but i can't figure it out:
I have made two new tables, one header and a lines table.
the lines table has an amount field, which is filled with a Quantity * unit price formula, works fine.
The header table has a sumindex field, which shows correctly the sum of the amount of all lines.
I also have another field, sales value, which is filled in manually.
The problem I have is with a field called Markup, which calculates the markup, based on a calculation that uses the sumindex field and the "sales value" field.
This formula works fine, After updating manually the "sales value" field.
What i would like to do and i am asking your help for:
How can I make this calculation run automatically after updating the quantity or the amount field.
The sumindex field in the header is updated, but how can i trigger the markup field to be calculated? ](*,)
thanks
A simple question for you who know, but i can't figure it out:
I have made two new tables, one header and a lines table.
the lines table has an amount field, which is filled with a Quantity * unit price formula, works fine.
The header table has a sumindex field, which shows correctly the sum of the amount of all lines.
I also have another field, sales value, which is filled in manually.
The problem I have is with a field called Markup, which calculates the markup, based on a calculation that uses the sumindex field and the "sales value" field.
This formula works fine, After updating manually the "sales value" field.
What i would like to do and i am asking your help for:
How can I make this calculation run automatically after updating the quantity or the amount field.
The sumindex field in the header is updated, but how can i trigger the markup field to be calculated? ](*,)
thanks
0
Comments
-
Put the controls ont he subform instead of the main for, its a lot easier that way.David Singleton0
-
for an example of that see here:
viewtopic.php?f=14&t=250560 -
Thank you for your quick reactions!
If I understand this example well, it will calculate the markup per line, am i right?
Maybe I did not mention good enough that the sales value field is manually introduced in the header. I would like to save the markup value in the header table. In my newbee experience i am feeling like i need some kind of a "on validate" functionality that triggers after the sumindex field in the header is updated, but there seems to be no trigger for that.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