Function _conGetFieldCC() Foundation

Obtain the value of a field variable of a specified workarea.

Syntax
ContainerHandle _conGetFieldCC(CHAR *warea,
                               CHAR *field,
                               ContainerHandle chDest);
Parameters
CHAR* warea
The character pointer warea contains the alias name of a workarea.
CHAR* field
The character pointer field contains the name of the Xbase++ field variable.
ContainerHandle chDest
The handle of a container that will hold the value of the field variable of the specified workarea. If NULLCONTAINER is passed to the function, a new container will be generated.
Return

This function returns the handle of a container that holds the value of the requested field variable of the specified workarea.

Description

This function is used to request the value of a field variable of a specific workarea.

Examples
#include <windows.h> 

#include "xppdef.h" 
#include "xpppar.h" 
#include "xppcon.h" 

XPPRET XPPENTRY MyCAPIFunction(XppParamList paramList) 
{ 
   ContainerHandle chName  = _conGetFieldCC( "PHONELIST", "NAME",  NULLCONTAINER ); 
   ContainerHandle chPhone = _conGetFieldCC( "PHONELIST", "PHONE", NULLCONTAINER ); 

   /* Now swap name and phone number... */ 

   if(_conSetFieldCC( "PHONELIST", "NAME", chPhone )) 
   { 
      /* Error handler... */ 
   } 

   if(_conSetFieldCC( "PHONELIST", "PHONE", chName )) 
   { 
      /* Error handler... */ 
   } 
} 

/* Xbase++ code */ 
PROCEDURE Main 
   LOCAL aStruct := { { "NAME",  "C", 30, 0 }, ; 
                      { "PHONE", "C", 30, 0 }  } 
   CLS 

   DbCreate( "PHONELIST", aStruct ) 

   USE PHONELIST NEW EXCLUSIVE 

   APPEND BLANK 
   PHONELIST->NAME  := "XENIA B." 
   PHONELIST->PHONE := "+49 6196 9572-0" 

   ? "NAME :", PHONELIST->NAME 
   ? "PHONE:", PHONELIST->PHONE 

   MyCAPIFunction() 

   ? "NAME :", PHONELIST->NAME 
   ? "PHONE:", PHONELIST->PHONE 

   CLOSE DATABASES 
RETURN 

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.