Updating Total (Like General Journal)
nick_robbo
Member Posts: 49
Hi,
I have a table with 3 fields, "Resource No." (PK), "Work Center No." (PK), "Time Split %" (Decimal).
I have a list page to display these fields, I have also updated the page to a Worksheet in order to try & solve this issue.
Really I am wanting to keep track of the Total "Time Split %". (So the sum of all "Time Split %" for that Resource).
This is to ensure it always adds up to 100%.
I would like to copy the functionality on the General Journal page, which keeps track of Balance & Total Balance.
I have a function in the page, called OnAfterGetCurrRecord called CalcTotal.
The function works when the page loads, and works when a value is updated...but only if the user uses the arrow keys
to go down/up on to another record.
In the General Journal, if you change the Amount field, and just use the left/right arrow key to move off the field to the right, it updates the Balance.
Is there anything I am missing?
Attached is a screenshot of the page etc.


I have a table with 3 fields, "Resource No." (PK), "Work Center No." (PK), "Time Split %" (Decimal).
I have a list page to display these fields, I have also updated the page to a Worksheet in order to try & solve this issue.
Really I am wanting to keep track of the Total "Time Split %". (So the sum of all "Time Split %" for that Resource).
This is to ensure it always adds up to 100%.
I would like to copy the functionality on the General Journal page, which keeps track of Balance & Total Balance.
I have a function in the page, called OnAfterGetCurrRecord called CalcTotal.
The function works when the page loads, and works when a value is updated...but only if the user uses the arrow keys
to go down/up on to another record.
In the General Journal, if you change the Amount field, and just use the left/right arrow key to move off the field to the right, it updates the Balance.
Is there anything I am missing?
Attached is a screenshot of the page etc.


0
Answers
-
Hi,
I think it is because when you did not move to another line, "Rec" has not been saved yet, so if you use another "ResourceWorkCenter" to CALCSUMS, you can only get old value.
That is why in General Journal, they use Rec and xRec
CalcBalance(Rec,xRec,Balance,TotalBalance,ShowBalance,ShowTotalBalance)
Check what CalcBalance do and make a similar function should be fine.1 -
This is weird, but changing the Source Expression in the page to a function has solved the issue. Instead of using Rec - xRec in the Source Expression.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 333 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 991 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
