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!!!
0
Comments
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.
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;
So if I understand correctly, your problem is how to filter on that value.
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:
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.