Calling Function in Form from Report

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";


  • ACaignieACaignie Member Posts: 90
    Define your item card as a variable, and call itemcard.GetWEDSurplus()
    The function must be set global on the page.
  • tpopowicztpopowicz Member Posts: 13
    That seemed to work great, thanks, so simple
Sign In or Register to comment.