PA_SetBooleanField

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_SetBooleanField (tNum; fNum; value)

ParameterTypeDescription
tNumshortTable number of the field to access
fNumshortField number of the field to access
valuecharNew value for the field

Description

The routine PA_SetBooleanField sets the value of the boolean field number fNum of the current record of table number tNum to value.

If the field is not a boolean field, the routine does nothing and sets an error in PA_GetLastError().

Remember that 4D expects that False = 0 and True = 1.

Example

Use macros for True and False.

   #define FALSE4D   ((char)0)
   #define TRUE4D   ((char)1)
   void mySetBooleanField(short tNum, short fNum, char b)
   {
      if(b)
         PA_SetBooleanField(tNum, fNum, TRUE4D);
      else
         PA_SetBooleanField(tNum, fNum, FALSE4D);
   }

See Also

PA_GetBooleanField.

Error Handling

Use PA_GetLastError to see if an error occurred (eER_InvalidFileNumber, eER_InvalidFieldNumber)


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next