global function

beasscript-logo-small

see function

 

Global functions have a form wide scope while function only exists in the script.

Functions can be declared inside Global Functions.

 

Syntax:

global function myFunc

 

end global

 

Call:

myFunc()

or

goto=myFunc()

or

if=x=y=myFunc()

 

 

Example: Event "before retrieve"

global funktion artikelpruefen

select count(*) from oitm where itemcode='<itemcode>'

if=<wert1>=0=fehler()

end

 

funktion fehler

meldung=fehler$Der Artikel <itemcode> existiert nicht

setitem=itemcode=

setcolumn=itemcode

end

end global

 

Call from event "positemchanged"

artikelpruefen()