Any ability to bulk MARK or bulk transfer?

Mike_HWG
Member Posts: 104
My situation is this:
1. Sales Line table has SumIndex set up for Amount Including VAT and a new field, Line Deal Amount
2. I have a codeunit that accepts the Sales Line table. The Sales Line may or may not have a filter set on the Document Type
3. The codeunit finds the sum of Amount Including VAT and Line Deal Amount, then adds it to a running total, which is returned to the user. If the record has a Document Type of Return Order or Credit Memo, the sum needs to be multiplied by -1 before it is added to the running total.
If the Sales Line gets passed with a simple filter on the Document Type, I can easily use CALCSUMS.
If there is no filter on Document Type, I can filter for Document Type equal to returns/credits and CALCSUM and multiply by -1, then filter for everything else and CALCSUM, then add the two results.
However, I'm trying to find a way to handle more complex filters.
I was hoping I could mass transfer the filtered records over to a temp table, then do a CALCSUM similar to how I do it when I have no filter set. However, I don't think there's a command to do TRANSFERFIELDS in bulk. I also thought about trying to use FILTERGROUPs and MARK, but I don't think filtergroups can stack on an existing filter, nor can I MARK in bulk.
As a result, I have to spin through records one-by-one to get my totals no matter whether I transfer to a temp table or if I were to spin through the passed table itself.
Is there a trick that I am unaware of, or am I just stuck spinning through the records?
1. Sales Line table has SumIndex set up for Amount Including VAT and a new field, Line Deal Amount
2. I have a codeunit that accepts the Sales Line table. The Sales Line may or may not have a filter set on the Document Type
3. The codeunit finds the sum of Amount Including VAT and Line Deal Amount, then adds it to a running total, which is returned to the user. If the record has a Document Type of Return Order or Credit Memo, the sum needs to be multiplied by -1 before it is added to the running total.
If the Sales Line gets passed with a simple filter on the Document Type, I can easily use CALCSUMS.
If there is no filter on Document Type, I can filter for Document Type equal to returns/credits and CALCSUM and multiply by -1, then filter for everything else and CALCSUM, then add the two results.
However, I'm trying to find a way to handle more complex filters.
I was hoping I could mass transfer the filtered records over to a temp table, then do a CALCSUM similar to how I do it when I have no filter set. However, I don't think there's a command to do TRANSFERFIELDS in bulk. I also thought about trying to use FILTERGROUPs and MARK, but I don't think filtergroups can stack on an existing filter, nor can I MARK in bulk.
As a result, I have to spin through records one-by-one to get my totals no matter whether I transfer to a temp table or if I were to spin through the passed table itself.
Is there a trick that I am unaware of, or am I just stuck spinning through the records?
Michael Hollinger
Systems Analyst
NAV 2009 R2 (6.00.34463)
Systems Analyst
NAV 2009 R2 (6.00.34463)
0
Answers
-
No, there is no trick. Do not forget that in NAV you need to do loopy-loopy things to get what you need.0
-
Alright, maybe next version I will petition for the "Hulk Smash" command
Thanks!Michael Hollinger
Systems Analyst
NAV 2009 R2 (6.00.34463)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