Venice
ProjectDet::SetFieldVal
 
Sets the value of a field.
 
void SetFieldVal (
    enum eProjectDetFld eFieldID,
    VARIANT vFieldValue
)
 
Parameters
eFieldID
[in] Identifier of the field, e.g. pjdfSysNum (C++) or eProjectDetFld.pjdfSysNum (C# / VB.NET).
 
Remark: In VBS, this field identifier enumerations cannot be used! You should use GetFieldID to get a valid field identifier.
vFieldValue
[in] A VARIANT containing the value you want to give the requested field.
 
See Also
CreateProjectDet
GetFieldVal
GetFieldStr
GetFieldID
 
Samples
 
C++
 
// Set the action date of the project detail to 26/04/2024
VARIANT vActionDate;
vActionDate.vt = VT_DATE;
vActionDate.date = COleDateTime (2024, 4, 26, 0, 0, 0).m_dt;
pProjectDet->SetFieldVal (pjdfActionDate, vActionDate);

C#
 
// Set the action date of the project detail to 26/04/2024
oProjectDet.SetFieldVal (eProjectDetFld.pjdfActionDate, new DateTime (2024, 4, 26));

VBS
 
' Set the action date of the project detail to 26/04/2024
Dim dtActionDate
dtActionDate = #4/26/2024#
Call oProjectDet.SetFieldVal(oProjectDet.GetFieldID("ActionDate"), dtActionDate)

VB.NET
 
' Set the action date of the project detail to 26/04/2024
Dim dtActionDate As Date
dtActionDate = #4/26/2024#
oProjectDet.SetFieldVal(eProjectDetFld.pjdfActionDate, dtActionDate)