
- 13 -
Define Printer Settings
Theactiondisplaysthedialogboxwithpropertiesoftheform'sselectedprinter.
Thiswaytheendusercanchangetheprinterpropertieslikeprintingspeed,darkness,andothercon-
trolsindependentlyfromthecurrentprintersettingsinthelabel,intheprinterdriverorprinterhard-
waresettings.Themodificationstheusermakesaretemporarilyandinfluencecurrentprintjobonly.
Themodificationsarenotsavedinthelabelorform.
Condition:Thisisascriptingbooleanexpression.Onlytworesultsarepossible(TrueandFalse).
Usethisoptiontoenablecurrentactiononlywhensometermismet.Theactionwillbestartedonly
ifconditionreturnsTrueastheresultoftheexpression.
Execute Script
Thisactiondefinestheprogrammingscriptthatyoucanuseforadvanceddatamanipulationonthe
form.Thescriptingallowsyoutoimplementsomefeaturethatisnotbuilt-intheapplicationand
expandthepossibilitiesinyourforms.
Severalscriptinglanguagesaresupportedontheform,butonlyoneatatime.Tochoosebetween
scriptinglanguagesseetheoptionsinFile -> Form Properties -> Scripting.
Define Script:Typeinyourscriptinthetextarea.
Build Script:ClickonthisbuttontoopentheExpressionEditorthatwillhelpyouconstructyour
script.Thebuttonmightnotbeavailableforallscriptinglanguages.
Check Script:Clickonthisbuttontoverifythesyntaxofyouscript.Ifthereisasyntaxerrorinthe
yourscript,youwillbenotifiedaboutit.
Condition:Thisisascriptingbooleanexpression.Onlytworesultsarepossible(TrueandFalse).
UsethisoptiontoexecutethecurrentactionExecute scriptonlywhentheconditionisTrue.
Execute SQL Statement
HereyoucandefineacustomSQLstatementthatcanadd,modify,ordeletedatainthedatabase
table.
WhenrunningformsondesktopplatformyoucanusetheSQLcommandsSELECT,INSERT,
UPDATEandDELETE.WhenrunningformsonthewebplatformyoucanuseallSQLcommands.
ThisprocedureisconsideredadvancedandrequirespriorSQLprogrammingknowledge.
SQL Statement:TypeintheSQLcommandstoexecutewiththisaction.TOuseform'svariablesin
theSQLstatement,putacolon(:)infrontoftheirname.Iftheformvariableincludesaspace,
enclosethevariableinsquarebrackets[].
Forexample:Theuserworkswithhiscustomerdatabase.ThetableCustomersincludesafield
namedCustomer_ID.ThereisavariableIDdefinedinaform.TheuserentersthevalueforID
usinganeditfieldandwantstodeleteallcustomerinformationfortheenteredID.The
SQLstatementwilldeleteallrecordswherethevalueoftheCustomer_IDfieldisequaltothe
enteredIDnumber(Customer_ID = ID).
YoumustusethevariableIDinyourSQLstatement.InNiceLabelsoftwareyoucandoitbyinclud-
ingcoloncharacter(:)infrontofthevariablename,likethis:
DELETEFROMCustomersWHERECustomer_ID=:[ID]
TotestyourSQLstatement,clicktheExecutebutton.
TheresultofyourSQLstatementisrememberedinthevariableyouselectintheVariablesection.
Kommentare zu diesen Handbüchern