Download Visual Extend 12.0 Developer Manual
Transcript
Visual Extend 12.0 User Manual More productive than ever before! Page 65 9.4.6. Required Fields The new form‟s properties cRequiredFields, cRequiredFieldInitProps, cRequiredFieldFailureProps and cRequiredFieldFailureForm are designated to avoid NULL or empty values being saved in database. In the listbox Required Fields List can be added any desired fields from the Field Assistant Window. At initiating of form control source of all controls will be checked against required fields list. All controls with a controlsource corresponding to the list, will be treated as required fields. Form Builder stores the list of required fields in property cRequiredFields of the form. In Init Properties textbox can be entered a semicolon separated list of properties and corresponding values for every property in following format: PropertyName = cExpression [; PropertyName = cExpression ] At initiating time, for all required fields this settings will be applied. In case of sample screenshot above for all controls which have required fields as control source, Forecolor property will be set to red, when controls are initiated. If more than one properties need to be set, separate the list with semicolon character. For example, if you‟d like to show required fields initially with bold font, in red fore color and light yellow background you need to write following expression in Init Properties textbox: FontBold = .T.; ForeColor = RGB(255,0,0); BackColor = RGB(255,255,196) This is very good way to show the end users which fields must be filled. The value of textbox Init Properties will be stored into cRequiredFieldInitProps property of the form.