KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: OK Variable
PRODUCT: 4D | VERSION: | PLATFORM:
Published On: August 28, 1999
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

The following operations set the 'OK' variable to '1' if successfully completed:

ACCEPT
ADD RECORD
ADD SUBRECORD
Append document
APPEND TO CLIPBOARD
APPLY TO SELECTION
ARRAY TO LIST
ARRAY TO SELECTION
ARRAY TO STRING LIST
BLOB TO DOCUMENT
CANCEL
CHANGE ACCESS
COMPRESS BLOB
CONFIRM
Create document
Create resource file
DELETE DOCUMENT
DELETE RESOURCE
DIALOG
DISTINCT VALUES
DOCUMENT TO BLOB
EXPAND BLOB
EXPORT DIF
EXPORT SYLK
EXPORT TEXT
GET ICON RESOURCE
Get indexed string
GET PICTURE FROM LIBRARY
GET PICTURE RESOURCE
GET RESOURCE
Get string resource
Get text from clipboard
Get text resource
IMPORT DIF
IMPORT SYLK
IMPORT TEXT
LIST TO ARRAY
LOAD SET
LOAD VARIABLES STRING
MODIFY RECORD
MODIFY SUBRECORD
Open document
Open resource file
ORDER BY
ORDER BY FORMULA
PRINT LABEL
PRINT SELECTION
PRINT SETTINGS
QUERY
QUERY BY EXAMPLE
QUERY BY FORMULA
QUERY SELECTION
QUERY SELECTION BY FORMULA
RECEIVE PACKET
RECEIVE RECORD
RECEIVE VARIABLE
RELATE MANY SELECTION
RELATE ONE
REPORT
Request
SAVE SET
SAVE VARIABLES
SEARCH BY INDEX
SELECT LOG FILE
SELECTION PLAY
SEND PACKET
SEND RECORD
SEND VARIABLE
SET CHANNEL
SET PICTURE RESOURCE
SET PICTURE TO CLIPBOARD
SET RESOURCE
SET RESOURCE NAME
SET RESOURCE PROPERTIES
SET STRING RESOURCE
SET TEXT RESOURCE
SET TEXT TO CLIPBOARD
SET TIMEOUT\
START WEB SERVER
USE ASCII MAP
VALIDATE TRANSACTION

Click here for the Online Language Reference Manual

One danger in relying on the results of the OK variable is that there is only one instance for all operations. Consider the example of RECEIVE PACKET and parsing the data and using SAVE RECORD. Depending on where you test for OK=1 both of these commands will set the variable to one. If you need to test that the packet has been successfully received you will need to test it after the RECEIVE PACKET command and before any other command that may potentially change its value such as the SAVE RECORD command.