GetDataByFieldName

concerns

The GetDataByFieldName attribute function loads the data to the current data entry of the loaded record.

 

Syntax

GetDataByFieldName(FieldName, NullValue)

Return value

Type

Description

Variant

Contents of the field of the current record

Parameter

Use

Name

Type

Passing

Description

Required

FieldName

String

ByVal

Name of the column of data

Required

NullValue

Variant

ByVal

Return value if the field is zero

 

Example:

 

Dim T As Table

 

T.Connection := DBCRM

T.Query := "SELECT * FROM DBO.OPPORTUNITIES WHERE OPID='1521587'"

 

If T.EOF = False Then

   OPPSTATUS := T.GetDataByFieldName("OPPSTATUS", 0)

   OPPFORECAST := T.GetDataByFieldName("OPPFORECAST", 0)

   OPPVOLUME := T.GetDataByFieldName("OPPVOLUME", 0)

   OPPLEAD := T.GetDataByFieldName("OPPLEAD", 0)

   OPPENDDATE := T.GetDataByFieldName("OPPENDDATE", Now + 60)

   OPPCONTACTCOUNT := T.GetDataByFieldName("OPPCONTACTCOUNT", 1)

   OPPCOMPETITORSCOUNT := T.GetDataByFieldName("OPPCOMPETITORSCOUNT", 0)

   OPPPRODUCTTYPESCOUNT := T.GetDataByFieldName("OPPPRODUCTTYPESCOUNT", 1)

End If