On Item Ledger Entry I have a flowfield called Complaint (boolean), that checks if a production order has a complaint job. The calcformula is:
Exist("Production Order" WHERE (Status=CONST(Finished),No.=FIELD(Prod. Order No.),Complaint job=FILTER(<>'')))
My problem is that I only want to calculate the field if Item Ledger Entry."Entry Type"=Output, and display that on Form 38 to avoid the field being calculated if entry type=consumption etc. Is that possible? Is there an alternative method of doing it?
zeon
0
Comments
Complaint := FALSE;
IF "Entry Type" = "Entry Type"::Output THEN
CALCFIELDS(Complaint);
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
i don't know a way to achieve your needs with flowfields, but you can calculate the field manually putting code under the form
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
IF "Entry Type" <> "Entry Type"::Output THEN
Complaint := FALSE;
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
First of all, compliant mustn't be a FlowField...and after that we can use your code like this
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Complaint is already a flowfield and calculated with calcformula
y shd we calculate again?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
because as i said, flowfields are always calculated when they're visible on a form (we CAN'T selectively calculate fields when running forms), so we have to change the fieldtype from flowfield to normal, and then proceed with a manual calculation. it's not a perfect solution, but it's the only one i know.
I'll make an example, i know my english is not perfect: try to create a tabular form using wizard with table g/l account.
select next and then balance from the field list (balance is a flowfield). you'll see that values are calculated.
now, click esc and finish the creation wizard. press f9 and check if there are CALCFIELDS word in the code.
After this click view, properties and check the value of "calcfields" property (it's undefined)
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
as u said we can take normal fields and calculate them in forms
i think we can do false them in forms if we dont want to calculate them in above case by writing
IF "Entry Type" <> "Entry Type"::Output THEN
Complaint := FALSE;
is dere any problem in this?
i mean in performance or etc?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
yes, there are performance issue and if the field is used somwhere else the data COULD not be consistent
P.S.: =D> for your 100th post! mohana_cse06
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
yes, there are performance issue and if the field is used somwhere else the data COULD not be consistent
P.S.: =D> for your 100th post! mohana_cse06[/quote]
thanq Belias.
am in learning stage.soon i want to become expert lik al of u..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Thanks for all your inputs!
I have put the code on the form and changed the field to Normal, BUT the only issue left is that users want to set filter on the form by F7 (on the complaint field), and when doing that the form displays no entries at all, so there is a trade-off in using this solution?!
It weird that the property AutoCalcField on a field on a form is not working?!
RIS Plus, LLC
MVP - Business Apps