This is very not standard, but I have some calculation code in my item card that I want to run in a report. Essentially have a qty available, very complicated in the form. I'd like to get that number without having to repeat all the calculations in my report, would like to call a function, pass in my record from the report, run my UpdateForm function with calculations and pass back the qty available for that record. Attempting something like this but this doesn't work
If FORM.RUNMODAL(30.GetWEDSurplus,Item2) = ACTION::LookupOK then
SurplusWED := WEDQty;
GetWEDSurplus(ItemWED : Record Item) WEDSurplusQty : Integer
WEDSurplusQty := "Surplus Qty. WED";
The function must be set global on the page.