Function _conGetFieldNC() Foundation

Obtain the value of a specific field variable of a certain workarea.

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

This function returns a handle to a container that contains the value of the requested field variable.

Description

This function is used to assign the value of specific field variable of a certain workarea to a container.

Examples
#include <windows.h> 

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

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

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

if(_conSetFieldNC( 1, "NAME", chPhone )) 
{ 
   /* Error handler... */ 
} 

if(_conSetFieldNC( 1, "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.