User Tools

Site Tools


incomplete_return_empty_req_control_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== INCOMPLETE (return empty REQ control) ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

INCOMPLETE( )

blk2blue.jpg

The INCOMPLETE procedure returns the field number of the first control with the REQ attribute in the currently active window that has been left zero or blank, and gives input focus to that control. If all REQ controls in the window contain data, INCOMPLETE returns zero (0) and leaves input focus on the control that already had it.

The INCOMPLETE procedure duplicates the action performed by the REQ attribute on a BUTTON control. You must remove the REQ attribute from the button for the INCOMPLETE() code to run, otherwise RTL will select the first REQ field and the EVENT:Accepted will not occur.

Return Data Type: SIGNED

Example:

CODE

OPEN(Window)

ACCEPT

 CASE ACCEPTED()

 OF ?OkButton

  IF ~Check1 AND ~Check2 AND ~Check3

   Message('You must check at least one box')

   CYCLE

  END

  ReqFld = INCOMPLETE()                   !Any REQ fields empty?

  IF ReqFld

   ReqFld{Prop:FillColor}=Color:Yellow    !color the bad field

   MESSAGE('The selected entry must be filled in.')

   CYCLE

  ELSE

   BREAK                                  !If not, go on

  END

 END

END

See Also:

REQ

BUTTON

incomplete_return_empty_req_control_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1