Siebel VB Language Reference > VB Language Reference >
Rem Statement
This standard VB statement identifies a line of code as a comment in a Basic program. Syntax
Rem comment Returns
Not applicable Usage
Everything from Rem to the end of the line is ignored when the program is executed. The single quote (') can also be used to initiate a comment. Example
This program is attached to a button on the Account Form applet that counts the number of corresponding child Contact records. Sub Button1_Click
Dim i as Integer Dim icount as Integer Dim oBC as BusComp
Rem Test this from the Account Contacts View Rem This code presumes that Account is the parent BusComp Rem BusObject returns the business object Rem associated with a control or applet.
Rem GetBusComp here returns a reference Rem to the BC that is in the UI context.
set oBC = me.BusObject.GetBusComp("Contact")
Rem FirstRecord positions you at the Rem first record in the business component. Rem FirstRecord, NextRecord, and so on, do not return Booleans. Rem Siebel VB does not have a Boolean data type.
i = oBC.FirstRecord Rem Returns 0 if fails, 1 if succeeds if i <> 1 then
else icount = 0 Rem This is a sample of using a while statement to loop. Rem NextRecord returns 1 if it succesfully Rem moved to the next record in the BC
While i = 1 icount = icount + 1 i = oBC.NextRecord Rem Returns 1 if successful wend oBC.FirstRecord end if
End Sub
|