sc_error_message(“pippo”);
don’t work in a PHP BUTTON is a bug?
sc_error_message(“pippo”);
don’t work in a PHP BUTTON is a bug?
Not if you look at the macro scope in the helpfile:
This macro generates an error messages.
In “Form and Control” applications, the messages are presented together with other error messages found in the application, except when using the “sc_error_exit” macro.
In “Grid and Menu” applications the messages only will be presented through the “sc_error_exit” macro.
Ex. 1:
if ({discount} > 0.10 && [glo_usr] == ‘operator’)
{
sc_error_message(“Discounting of " . {discount} . " above of the allowed one”);
}
In this example, if the value in the discount field is over 0.10 and the user try to add or save this record, the operation is finished and the error message is presented.The command must finish with “);” (close parentheses and semicolon) used as delimiter for the macro interpreter.
Macro Scope
Blank application Control Form Search application Form application
onBeforeUpdateAll onBlur
onChange
onClick
onFocus
onLoadAll
onRefresh
onScriptInit
onValidate
onValidateFailure
onValidateSuccess OnValidate ajaxFieldonBlur
onAfterDelete
onAfterDeleteAll
onAfterInsert
onAfterInsertAll
onAfterUpdate
onAfterUpdateAll
onBeforeDelete
onBeforeDeleteAll
onBeforeInsert
onBeforeInsertAll
onBeforeUpdate
Onchange
OnClick
OnFocus
onNavigate
onValidate
onValidateFailure
onValidateSuccess