I want to turn off the required behavior for a column in PowerBuilder DataWindow, v10.2. The database column is nullable, but I get "Required value missing..." if a value is not supplied for the column on an add.
Asked
Active
Viewed 2,545 times
1 Answers
0
In the Properties pane for the column, there is a Required attribute on the Edit tab. That's what you're after.
Good luck,
Terry.

Terry
- 6,160
- 17
- 16
-
The column is a check box and the required flag isn't on the Edit properties tab. Can it be set in a script? – Pete Yankovich Jan 14 '14 at 17:23
-
Yes, it can. If you're lucky, you'll be able to find something like dw.Modify ("
.Edit.Required"). If you're using a framework (like PFC), finding the source might be more obtuse. Just an extra, to double check this this message is initiated by the Required attribute, in the debugger, I'd open QuickWatch and evaluate "Clipboard (dw.Describe('datawindow.syntax'))", paste the syntax into a text editor and verify that the column has that attribute set. ("::Clipboard..." if called from a DW script, IIRC) – Terry Jan 14 '14 at 19:26 -
FYI - setting edit.required converts the column from a "check box" edit to "edit" edit. The solution for me was to set the column to a default value in postinsert to avoid validation error. – Pete Yankovich Jan 14 '14 at 21:24
-
Oh, a checkbox! I think they're pretty much required. The best way to handle that is to set the Initial Value attribute on the column on the Column Specification pane in the DW painter. Doing a Set...() by script will tag the row status as modified; columns with Initial Value won't have their status set to modified until a column has been edited. – Terry Jan 20 '14 at 15:57