How can I sum two flowfields?

rafaeru
Member Posts: 5
Hello
I have a new form and I have two flowfields, I made a function that substract both and set the value in a new field of the form, but now I need this value in the table in order to don't show the values equal to zero in the form. Is this posible? Substract two flowfields of the same table in the same table? any other idea?
thanks a lot!!!
I have a new form and I have two flowfields, I made a function that substract both and set the value in a new field of the form, but now I need this value in the table in order to don't show the values equal to zero in the form. Is this posible? Substract two flowfields of the same table in the same table? any other idea?
thanks a lot!!!
0
Comments
-
So you have a function with a Decimal output that comes from two FlowFields. You did not say what it was so I will use my own example, you have an AvailableInventory function in the Item Card showing Inventory - Qty. on Sales Order.
And you want to create a list of items that where AvailabeInventory <>0
It really depends on what you need to do with this list form. For example does a report not suffice? An Excel Export? Or you can do this, but it is not very easy: http://www.mibuso.com/dlinfo.asp?FileID=515
Or you can set SourceTableTemporary = true and fill the temp table in the opening triggers.
Or you can have a form called "special item lists" and with buttons or menu items on it that launch a copy (save as) of the item list form, set sourcetabletemporary = yes and populated in various ways. I did this just yesterday. We needed a list of current items, meaning either on stock now or sold in the last 12 months so I created this. I expect more "weird" lists coming so I found it OK to dedicate 2 forms to it.0 -
Dear,
Try to add Calcfields before processing or filter to Flow Field Records,
example :
Record1.Calcfields(Record1.Amount);
Record2.Calcfields(Record2.Amount);
Total := Record1.Amount + Record2.Amount;0 -
Hi rafaerurafaeru wrote:... but now I need this value in the table in order to don't show the values equal to zero in the form. Is this posible? Substract two flowfields of the same table in the same table? any other idea?
You cannot create a flow field showing the difference of two sums.
You cannot create a filter in NAV using the difference of tho fields, or the value of a function.
The following options come to mind to solve your problem:- Use a normal field in the table which you modify in the table triggers of the tables the calculation is based on
- Use a temporary table
- use MARK and MARKEDONLY functions
- Filter the form using code in the OnFindRecord and OnNextRecord triggers
Have a look at this post in order to get an Idea of what I talk about in the 3rd option above. That code needs to be enhanced though in order to work as expected in all situations.
All of these "solutions" are crutches. If possible, avoid them all.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