notNull forbids the user to enter NULL values into the form field during an INPUT statement:
Form XML code:
Possible values:
true, false
Default value:
true – for CheckBox
false – for other widgets
Associated widgets:
Associated 4gl statements:
Associated ui methods:
setNotNull ↓
getNotNull
Influence and behavior:
If notNull is set to TRUE for a form field, you must enter some not null value to this field during an INPUT statement.
Otherwise, you will not be able to press the Accept button (to submit your input) and will get an error message:
lycia form designer:
4gl code sample:
MAIN
DEFINE f1,f2 STRING
OPEN WINDOW w WITH FORM "notnull" ATTRIBUTE(BORDER)
INPUT BY NAME f1,f2
END MAIN
runtime behavior:
At runtime, you can use the ui method – setNotNull() – to stop the user from entering null values into the form field during an INPUT statement:
LET widget_var = ui.<widget>.ForName("widget_id1")
CALL widget_var.setNotNull(...)
4gl example program:
MAIN
DEFINE f1,f2 STRING
DEFINE cld1,cld2 ui.Calendar
OPEN WINDOW w WITH FORM "notnull_ui" ATTRIBUTE(BORDER)
LET cld1= ui.Calendar.ForName("f1")
LET cld2= ui.Calendar.ForName("f2")
CALL cld1.setNotNull(1)
CALL cld2.setNotNull(0)
INPUT BY NAME f1
INPUT BY NAME f2
END MAIN
runtime behavior: