Show / Hide Table of Contents

GetField

Object and Type

Object  : FCGeneric

Type     : Method

Prototype

Public Function GetField(ByVal field_name As String) As Variant

Description

This method returns the value in a column of the current record in a generic object. It is exactly the same as using the Fields property. It is provided for similarity with ClearBasic.

Returns

The value in the field is returned.

Example

The following example queries for a specific site. It then displays fields using the GetFields method.

JavaScript:

  // Find one site
  var boSite = FCSession.CreateGeneric();
  boSite.SimpleQuery("site");
  boSite.AppendFilter("objid", "=", 268435457);
  boSite.Query();

  // Print out some data with GetField
  Response.Write ("Site ID  : " + boSite.GetField("site_id"));
  Response.Write ("Site Name: " + boSite.GetField("name"));

Visual Basic:

  Dim boSite As FCGeneric

  Set boSite = fc_session.CreateGeneric
  boSite.SimpleQuery "site"
  boSite.AppendFilter "objid", "=", 268435457
  boSite.Query

  MsgBox "Site ID  : " & boSite.GetField("site_id")
  MsgBox "Site Name: " & boSite.GetField("name")
Back to top © 2022 Dovetail Software, Inc. - All rights reserved.
Clarify, Amdocs, and related products and names are copyright and trademark of Amdocs, Inc.
.NET, Visual Studio.NET, C#, Visual Basic and related products are trademark of Microsoft corporation.