Help With Find Trigger

mnorton

New Member
I am considering adding a FIND trigger to our system, but am not sure the concept will work.

We have a table inv_adjust that contains increments and decrements to inventory. Say I take 5 widgets from a bin in the warehouse, I insert a record in the inv_adjust table with a the widget id and -5 for the adjustment value.

There is a process that runs at night and rolls all these detail records back up into the master by summing the values.

I would like to make a find trigger on the inventory table so when you search for a widget, the current on-hand value and the adjustment values are summed and returned as the value for the on-hand field.

Is this possible? Any suggestions, warnings, or tips?

Thanks.
 

lord_icon

Member
Basically you need with your description an
ON FIND TRIGGER <field-name>:
IF THEN / CASE criteria ...
DO:
END.
END.

Regards
 
Top