CasewareDocs

SharedUserData

Gets/sets a reference to a dictionary that can be used to store user-definable persistent data for the current Standard Import Routine and all its active extensions.

See also: SharedTempUserData, TempUserData, UserData.

Compatibility

Available as of IDEA version 10.2

Syntax

SharedUserData()

Remark

SharedUserData is a persistent data object (of the same type as UserData) shared by the main Standard Import Routine and all its extensions that are active in a session. This allows the Standard Import Routine and its extensions to share data in a controlled manner.

As of IDEA version 10.2 the UserData collection was transformed into a private Standard Import Routine / Standard Import Routine extension data store that is shared only by the subtasks of a Standard Import Routine or Standard Import Routine extension. Compatibility with already persisted Standard Import Routine sessions is preserved.

Example

Option Explicit 
'SharedUserData
'Gets/sets a reference to a dictionary that can be used to store user-definable data for the current CIR execution.
Sub Main()
Dim element As String
Dim text As String
Dim userdata As Object

Set userdata = SmartContext.SharedUserData

element = "Key"

'Add
userdata.Add element, "Value"

'Contains
If userdata.Contains(element) Then

'Item
text = userdata.Item(element)
Else
text = "Not contained"
End If

MsgBox text

'Remove
userdata.Remove element

'Clear
userdata.Clear
End Sub