|  | 
			
				| Gets the value of a field as a variant. | 
			
				|  | 
			
				| 
						
							|  | VARIANT GetFieldVal ( enum eContactFld eFieldID
 )
 |  | 
			
				|  | 
			
				| 
						| Parameters |  | eFieldID |  | [in] Identifier of the field, e.g. ctcfSysNum (C++) or eContactFld.ctcfSysNum (C# / VB.NET). 
		|  |  |  |  | Remark: In VBS, this field identifier enumerations cannot be used! You should use GetFieldID to get a valid field identifier. |  |  |  |  | Return value |  | A VARIANT containing the value of the requested field. Be aware that this can be a null-object in some cases, e.g. if the value of a system field (e.g. Crc1) is requested.
 |  
							|  |  
							| See Also |  
							|  |  | 
			|  | 
			| Samples | 
			|  | 
			
				| 
						
							|  | C++ |  
							|  | // Retrieving the value of all standard fields (excludes calculation fields)
 _variant_t vValue;
 for (int nFieldID = 0; nFieldID <= ctcfMax; nFieldID++)
 {
 vValue = pContact->GetFieldVal ((eContactFld)nFieldID);
 if (vValue.vt != VT_EMPTY)
 {
 // Process data
 }
 }
 
 
 |  | 
			
				| 
						
							|  | C# |  
							|  | // Retrieving the value of all standard fields (excludes calculation fields)
 object oValue = null;
 for (int nFieldID = 0; nFieldID <= (int)eContactFld.ctcfMax; nFieldID++)
 {
 oValue = oContact.GetFieldVal ((eContactFld)nFieldID);
 if (oValue != null)
 {
 // Process data
 }
 }
 
 
 |  | 
			
				| 
						
							|  | VBS |  
							|  | ' Retrieving the value of all standard fields (excludes calculation fields)
 Dim vValue
 Dim iFld
 For iFld=0 To oContact.GetFieldID("FutureUse")
 vValue = oContact.GetFieldVal(iFld)
 If VarType(vValue) <> vbNull Then
 ' Process data
 End If
 Next
 
 
 |  | 
			
				| 
						
							|  | VB.NET |  
							|  | ' Retrieving the value of all standard fields (excludes calculation fields)
 Dim oValue As Object
 For iFieldID As Integer = 0 To eContactFld.ctcfMax
 oValue = oContact.GetFieldVal(iFieldID)
 If Not oValue Is Nothing Then
 ' Process data
 End If
 Next
 
 
 |  |