Summary of functions

Note: Functions are case sensitive. Use lowercase only.
Script Function Object/Notes
presave(): Before the standard save, after security check has been passed. The result determines whether the save continues or aborts.

postsave(): Immediately after any other post-save processing and does not alter the outcome of the event. For example, can write information about an object to a text file.

postload (): Immediately after loading the header of an object.

<detail>postload(): Immediately after loading the detail of an object. For example, ingrpostload() can be used with formula ingredients.

Any objects that can be edited in the Symbol form.
prerowupdate(): Before ingredient or parameter row update.

postrowupdate(): After successful update of ingredient or parameter row.

The detail code must be before the function. For example ingrprerowupdate and ingrpostrowupdate.

Formula

Item

Project

Specification

TPPreRowUpdate, TPPostRowUpdate Specification
TPAllPreRowUpdate, TPAllPostRowUpdate Formula, Item, Project

IngrPreRowUpdate, IngrPostRowUpdate

Formula
PreSearch, PreSearchExecute, PostSearch See Search <Object> forms in the Web Client.
ObjProperty and ObjPropertySet Single value
GetCurrentRowValue Gives you access to some fields that ObjProperty and ObjPropertySet cannot.
prerescale(): Before the formula ingredients, byproducts or alternate ingredients are re-scaled.

postrescale(): After the formula ingredients, byproducts or alternate ingredients are re-scaled

Formula
calcprecalc(): Before calculations. Can abort the calculation.

calcpostcalc(): After calculations. Can generate an error message and abort a save operation although the calculation has completed.

Formula

Project

importXmlPreSave(): When you add this function to the script of a symbol, it will be called when importing an object before the object is saved.

This is an example of updating a newly imported formula with a status of 90 with the importXMlPreSave script hook:

Class HookScript
Inherits FcProcFuncSetEventHook

Function importXmlPreSave () As Long
'set status to 90-informational for new formula imported
ObjPropertySet(90, 1, "STATUSIND.STATUS", "", "")
return 0
End Function
End Class
Any objects that can be edited in the Symbol form.
PreGenerate(): Before the Generate event starts. The result determines whether the event continues or aborts.

PreGenerateLabelUpdate(): After the formulas have been exploded and the ingredients determined, but before the label text has been generated.

PostGenerate(): : After the label text has been generated.

Label