The message that PowerBuilder displays instead of the default message when an ItemError event occurs in the column.
Column controls
PowerBuilder dot notation:
dw_control.Object.columnname.ValidationMsg
Describe and Modify argument:
"columnname.ValidationMsg { = ' string ' }"
Parameter |
Description |
---|---|
columnname |
The column for which you want to get or set the error message displayed when validation fails. |
string |
(exp) A string specifying the error message you want to set. String is quoted and can be a DataWindow expression. |
Set the value using the Column Specifications view, Validation Message option.
string setting
setting = dw1.Object.emp_salary.ValidationMsg
dw1.Object.emp_salary.ValidationMsg = &
"Salary must be between 10,000 and 100,000"
setting = dw1.Describe("emp_salary.ValidationMsg")
dw1.Modify("emp_salary.ValidationMsg = " &
"'Salary must be between 10,000 and 100,000'")