Click or drag to resize

INumbersAdd Method

Add - creates a new counter for a field. e.g: Add('contact.number2') Creates a new counter for a field. e.g: Add('contact.number2'). The example with add a counter to one of the fields created in the SODictionarySDK examples.

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
void Add(
	string TableAndFieldName
)

Parameters

TableAndFieldName
Type: SystemString
The table and field name of the field you want to add into the number
Examples

Add

This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.

VB
Set soApp = CreateObject("SuperOffice.Application.1")
Dim numb
Set numb = soApp.Database.Numbers

MsgBox "Is the counter for Contact Number 2 active? " & numb.IsActive("contact.number2")
numb.Add ("My_own_table.My_Text")
MsgBox "Current counter for My_Own_Table.My_Text value = " & numb.Value("My_own_table.My_Text")
numb.GetNext ("My_own_table.My_Text")
MsgBox "Current counter for My_Own_Table.My_Text value = " & numb.Value("My_own_table.My_Text")
numb.GetNext ("My_own_table.My_Text")
MsgBox "Current counter for My_Own_Table.My_Text value = " & numb.Value("My_own_table.My_Text")
numb.GetNext ("My_own_table.My_Text")
MsgBox "Current counter for My_Own_Table.My_Text value = " & numb.Value("My_own_table.My_Text")
numb.GetNext ("My_own_table.My_Text")
MsgBox "Current counter for My_Own_Table.My_Text value = " & numb.Value("My_own_table.My_Text")

MsgBox "We will now remove the counter for My_Own_Table.My_Text"
numb.Remove "My_own_table.My_Text"

MsgBox "Now we add the counter again"
numb.Add ("My_own_table.My_Text")
MsgBox "Current counter for My_Own_Table.My_Text after delete. Value = " & numb.Value("My_own_table.My_Text")
numb.GetNext ("My_own_table.My_Text")
MsgBox "Current counter for My_Own_Table.My_Text value = " & numb.Value("My_own_table.My_Text")

See Also