| Stonefield Query SDK |
| Item |
Syntax
Item(ItemName as String) as Object
Item(Index as Integer) as Object
Parameters
ItemName
The name of the member to return an object for.
Index
The index of the member to return an object for.
Return Value
A reference to the member object if it exists or null if not.
Example
This example, which could be used as the code for the DataEngine.GetCustomMetaData script for a project, changes the caption for a specific field. This is commonly used when the user can change the headings of fields in the application. Although this is shown as a hard-coded caption in this example, in actual use, you'd look up the caption for the field wherever your application stores it.
Visual FoxPro
lparameters toApplication as SQApplication
local loField as Field
loField = toApplication.DataEngine.Fields.Item('CUSTOMER.COMPANY')
loField.Caption = 'Organization Name' VBScript
function Main(Application)
dim Field
set Field = Application.DataEngine.Fields.Item("CUSTOMER.COMPANY")
Field.Caption = "Organization Name"
end function JavaScript
function Main(Application) {
var Field = Application.DataEngine.Fields.Item('CUSTOMER.COMPANY') ;
Field.Caption = 'Organization Name' ;
} C#
public static bool DataEngine_GetCustomMetaData(SFQApplication sfqApplication)
{
Field field = sfqApplication.DataEngine.Field.Item("CUSTOMER.COMPANY");
field.Caption = "Organization Name";
} VB.NET
public shared function DataEngine_GetCustomMetaData(sfqApplication as SFQApplication) _
as Boolean
Field field = sfqApplication.DataEngine.Field.Item("CUSTOMER.COMPANY")
field.Caption = "Organization Name"
End FunctionSee Also
AddItem | Collections
| Last Updated: 06/11/10 |