AppConnStringMap Object

Use the AppConnStringMap object to manage maps of strings. This object is similar to the AppConnStringList except the AppConnString map deals with name/value pairs. This object is mainly used with relation to setting or getting the Attributes of a model.

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

Add Method

Used to add an element to an AppConnStringMap.

Syntax

object.Add Name, Value

Part Description
object An AppConnStringMap object
Name

The name for an element

Value The value for an element

Remarks

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

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity, strAttrName, strAttrValue As String
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
MsgBox (AttributesClone.Item("AcctNumber"))

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set Attributes = Nothing

Clear Method

Used to remove all elements from an AppConnStringMap.

Syntax

object.Clear

Part Description
object An AppConnStringMap

Remarks

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

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity, strAttrName, strAttrValue As String
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
MsgBox (Attributes.Item("AcctNumber"))

Attributes.Clear

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set Attributes = Nothing

Clone Method

Used to clone an AppConnStringMap.

Syntax

Set Copy = object.Clone

Part Description
object An AppConnStringMap
Copy A copy of the AppConnStringMap

Remarks

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

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity, strAttrName, strAttrValue As String
Dim Attributes, AttributesClone As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
Set AttributesClone = Attributes.Clone
MsgBox (AttributesClone.Item("AcctNumber"))

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set Attributes = Nothing
Set AttributesClone = Nothing

Count Property

Used to get the number of elements in the AppConnStringMap.

Syntax

object.Count

Part Description
objectAn AppConnStringMap

Remarks

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

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity, strAttrName, strAttrValue As String
Dim Attributes, AttributesClone As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
MsgBox ("count of records = " & Attributes.Count)


Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set Attributes = Nothing

GetLocale Method

Retrieves the Locale for the AppConnStringMap.

Syntax

Locale = object.GetLocale

Part Description
object An AppConnStringMap
Locale The locale designation

Remarks

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

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity, strAttrName, strAttrValue As String
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.SetLocale ("en_us")
MsgBox ("Locale is = " & Attributes.GetLocale)
Attributes.Add strAttrName, strAttrValue

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set Attributes = Nothing

Item Property

Used to get an element in an AppConnStringMap.

Syntax

object.Item(Index)

object.Item("Name")

object(Index)

object("Name")

object!Name

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

Remarks

Use the Item property to get or set an element in a string AppConnStringMap.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity, strAttrName, strAttrValue As String
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
MsgBox ("Account Number = " & Attributes.Item(1))
MsgBox ("Account Number = " & Attributes.Item("AcctNumber"))
MsgBox ("Account Number = " & Attributes(1))
MsgBox ("Account Number = " & Attributes("AcctNumber"))
MsgBox ("Account Number = " & Attributes!AcctNumber)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set Attributes = Nothing

Keys Property

Method used to get a list of the keys of the elements in the string AppConnStringMap.

Syntax

Set Keys = object.Keys

Part Description
Keys An AppConnStringList of the keys for the AppConnStringMap
object An AppConnStringMap

Remarks

Use the Keys property to get a list of the keys in a string AppConnStringMap.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity, strAttrName, strAttrValue As String
Dim Attributes As AppConnStringMap
Dim Keys As AppConnStringList

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Set KeyList = Attributes.Keys
MsgBox ("key list is " & KeyList(1))

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set Attributes = Nothing
Set Keys = Nothing

Remove Method

Used to remove an element from a string AppConnStringMap.

Syntax

object.Remove Index

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

Remarks

Use the Remove method to add an element to a string AppConnStringMap.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity, strAttrName, strAttrValue As String
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

Set Attributes = New AppConnStringMap
strAttrName = "AcctNumber"
strAttrValue = "167439459"
Attributes.Add strAttrName, strAttrValue
strAttrName = "AcctNumber2"
strAttrValue = "167439459"
Attributes.Add strAttrName, strAttrValue
MsgBox ("Attribute count = " & Attributes.Count)
Attributes.Remove (2)
MsgBox ("Attribute count = " & Attributes.Count)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set Attributes = Nothing

SetLocale Method

Sets the Locale for the AppConnStringMap.

Syntax

object.SetLocale Locale

Part Description
object An AppConnStringMap
Locale The locale designation

Remarks

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

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity, strAttrName, strAttrValue As String
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.SetLocale ("en_us")
MsgBox ("Locale is = " & Attributes.GetLocale)
Attributes.Add strAttrName, strAttrValue

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set Attributes = Nothing

 

 

  Attachmate