AppConnStringList Object

Use the AppConnStringList object to manage lists of strings. This object is similar to the AppConnStringMap except the AppConnString map deals with name/value pairs instead of single strings.

Click a method to see more information on its use, syntax, and parameters:

Add Method

Used to add an element to an AppConnStringList.

Syntax

object.Add String

Part Description
object An AppConnStringList
String A text string

Remarks

Use the Add method to add an element to an AppConnStringList.

Example

Dim Verastream_Session As AppConnModel
Dim AttributeList As AppConnStringList
Dim strModelName, strServerName, strEntity As String

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "SignonPanel"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

Set AttributeList = Verastream_Session.GetEntityAttributes(strEntity)
MsgBox ("There are " & AttributeList.Count & " attributes on the entity.")

AttributeList.Add ("NewAttributeName")
MsgBox ("There are now " & AttributeList.Count & " attributes on the entity.")

Verastream_Session.Disconnect
Set AttributeList = Nothing
Set Verastream_Session = Nothing

Clear Method

Used to remove all elements from an AppConnStringList.

Syntax

object.Clear

Part Description
object An AppConnStringList

Remarks

Use the Clear method to remove all of the elements from an AppConnStringList.

Example

Dim Verastream_Session As AppConnModel
Dim AttributeList As AppConnStringList
Dim strModelName, strServerName, strEntity As String

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "SignonPanel"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Set AttributeList = Verastream_Session.GetEntityAttributes(strEntity)

MsgBox ("There are " & AttributeList.Count & " attributes on the entity.")
AttributeList.Clear
MsgBox ("There are now " & AttributeList.Count & " attributes in the list.")

Verastream_Session.Disconnect
Set AttributeList = Nothing
Set Verastream_Session = Nothing

Clone Method

Used to clone an AppConnStringList.

Syntax

Set Copy = object.Clone

Part Description
object An AppConnStringList
Copy A copy of the AppConnStringList

Remarks

Use the Clone method to create a clone of an AppConnStringList.

Example

Dim Verastream_Session As AppConnModel
Dim AttributeList, AttributeListClone As AppConnStringList
Dim strModelName, strServerName, strEntity As String
Dim I As Integer

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "SignonPanel"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

Set AttributeList = Verastream_Session.GetEntityAttributes(strEntity)
MsgBox ("There are " & AttributeList.Count & " attributes in AttributeList.")

Set AttributeListClone = AttributeList.Clone
MsgBox ("There are now " & AttributeListClone.Count & _
    " attributes in AttributeListClone.")

Verastream_Session.Disconnect
Set AttributeList = Nothing
Set AttributeListClone = Nothing
Set Verastream_Session = Nothing

Count Property

Used to get the number of elements in the AppConnStringList.

Syntax

object.Count

Part Description
object An AppConnStringList

Remarks

Use the Count property to get the number of elements in an AppConnStringList.

Example

Dim Verastream_Session As AppConnModel
Dim AttributeList As AppConnStringList
Dim strModelName, strServerName, strEntity As String
Dim I As Integer

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "SignonPanel"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Set AttributeList = Verastream_Session.GetEntityAttributes(strEntity)

MsgBox ("There are " & AttributeList.Count & " attributes on the entity.")

Verastream_Session.Disconnect
Set AttributeList = Nothing
Set Verastream_Session = Nothing

GetLocale Method

Retrieves the Locale for the AppConnStringList.

Syntax

Locale = object.GetLocale

Part Description
object An AppConnStringList
Locale The locale designation

Remarks

Use the GetLocale method to get the locale of the AppConnStringList, which may be set with the SetLocale method.

Example

Dim Verastream_Session As AppConnModel
Dim AttributeList As AppConnStringList
Dim strModelName, strServerName, strEntity As String
Dim I As Integer

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "SignonPanel"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

Set AttributeList = Verastream_Session.GetEntityAttributes(strEntity)
AttributeList.SetLocale ("en_us")
MsgBox ("The locale is " & AttributeList.GetLocale)

Verastream_Session.Disconnect
Set AttributeList = Nothing
Set Verastream_Session = Nothing

Item Property

Used to get and set an element in an AppConnStringList.

Syntax

object.Item(Index) or object.Item("Name")

object.(Index) or object.("Name")

object!Name

Part Description
object An AppConnStringList
Index The name or index(starting at 1) of an element in the AppConnStringList
Name The name of an element in the AppConnStringList

Remarks

Use the Item property to get or set an element in an AppConnStringList.

Example

Dim Verastream_Session As AppConnModel
Dim AttributeList As AppConnStringList
Dim strModelName, strServerName, strEntity As String
Dim I As Integer

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "SignonPanel"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

Set AttributeList = Verastream_Session.GetEntityAttributes(strEntity)
MsgBox ("The first attribute is " & AttributeList.Item(1))
MsgBox ("The first attribute is " & AttributeList.Item("UserID"))
MsgBox ("The first attribute is " & AttributeList(1))
MsgBox ("The first attribute is " & AttributeList("UserID"))
MsgBox ("The first attribute is " & AttributeList!UserID)

Verastream_Session.Disconnect
Set AttributeList = Nothing
Set Verastream_Session = Nothing

Remove Method

Used to remove an element from an AppConnStringList.

Syntax

object.Remove Index

Part Description
object An AppConnStringList
Index The name or index(starting at 1) of an element in the AppConnStringList

Remarks

Use the Remove method to add an element to an AppConnStringList.

Example

Dim Verastream_Session As AppConnModel
Dim AttributeList As AppConnStringList
Dim strModelName, strServerName, strEntity As String
Dim I As Integer

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "SignonPanel"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

Set AttributeList = Verastream_Session.GetEntityAttributes(strEntity)
MsgBox ("There are " & AttributeList.Count & " attributes in AttributeList.")
AttributeList.Remove (1)  ' Removes the first attribute in the list
MsgBox ("There are " & AttributeList.Count & " attributes in AttributeList.")

Verastream_Session.Disconnect
Set AttributeList = Nothing
Set Verastream_Session = Nothing

SetLocale Method

Sets the Locale for the AppConnStringList.

Syntax

object.SetLocale Locale

Part Description
object An AppConnStringList
Locale The locale designation

Remarks

Use the SetLocale method to set the locale of the AppConnStringList, which may be retrieved with the GetLocale method.

Example

Dim Verastream_Session As AppConnModel
Dim AttributeList As AppConnStringList
Dim strModelName, strServerName, strEntity As String
Dim I As Integer

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "SignonPanel"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

Set AttributeList = Verastream_Session.GetEntityAttributes(strEntity)
AttributeList.SetLocale ("en_us")
MsgBox ("The locale is " & AttributeList.GetLocale)

Verastream_Session.Disconnect
Set AttributeList = Nothing
Set Verastream_Session = Nothing

 

 

  Attachmate