Dear All experts,
I have created a new field in the machine card. The field relates to capacity ledger entry. The field data is from it. I have set the properties as follows:
The field type is decimal
fieldclass : normal
tablerelation : capacity ledger entry.newfield.where(type=filter(machine center),no=field(no)))
editable : no
but when I open the card the field is still empty or zero (o) and I still have to drilldown and click the value and click OK button. I want it filled automatically (every result of output journal posted) and only shows the value of the newest posting date (the very bottom line). for example, I post 90, then in the capacity ledger entry, there is 90 in the field and in the machine card is also 90, without drill it down to fill it manually.
I also try using set up as follows:
fieldclass : flowfield
calcformula : lookup("capacity ledger entry",new field.where(no.=field(no).prod.order no. = filter(newprod. order)))
but still not work.
Pls let me know how to make it work. I appreciate your answer very much.
rgds,
Mark
0
Comments
2) With the Lookup is problem that it will take first found value. Lookup is just only for cases when you can filter out one record (for example if you know the PK values). If you need to have some value from last record, it is not possible to do that through flowfield without using some C/AL code.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Could you pls let me know the C/AL code ?
I actually wonder how the C/AL editor work in navision ? what is .net, how to make C/AL editor and how navision could be such an executable file but Ican write code there ? I've seen and used visual basic program but this navision seems wonderful.
rgds,
Mark
Of course, this code has many errors, because is filtering some fields but there is not selected correct key (it means performance problems), it assume that the records in the variable CapacityLedgerEntry are sorted in order from Oldest to Newest... etc. But take it only as example how you can find some last record based on some filters...
Welcome into world of wonders... 8)
For starting I advice you to read the basic developer documentation (on product CD in DOC folder file w1w1adg.pdf).
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
rgds,
MArk