Hello.
I need to sum a field real time, where center no is M-150.
I need to do it without flowfield.
I make this, but gives me only 0 as result.
Routing Line table -> new field -> Sum M-150 as decimal field
Routing Line table -> new funcition -> SumTotal150
Variables for this funcion -> RoutLine, datatype is record, subtype is Routing Line
Code:
RoutLine.RESET;
RoutLine.SETCURRENTKEY("Routing No.", "Work Center No.");
RoutLine.SETRANGE("Routing No.","Routing No.");
RoutLine.SETRANGE("Work Center No.", 'M-100');
RoutLine.CALCSUMS("Real Time");
Save this result.
I go to my new field Sum M-150 on validate() and place there name of the function like this -> SumTotal150;
Result is everything 0
Where do I make a mistake?
0
Answers
add
exit(RoutLine."Real Time");
as last line of the function.
Put the function SumTotal150 in your page, where you now put the field "Sum M-150".
Set the page field to editable FALSE.
new field Sum M-150
onvalidate field Sum M-150
function
Nothing changed.
Add the function to the form or page, just like you added the field like this: