SharedTempUserData
Gets/sets a reference to a dictionary that can be used to store user-definable non-persistent data for the current Standard Import Routine and all its active extensions.
See also: SharedUserData, TempUserData, UserData.
Compatibility
Available as of IDEA version 10.2
Syntax
SharedTempUserData()
Remark
SharedTempUserData is a non-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 Custom Import Routine extension. Compatibility with already persisted Standard Import Routine sessions is preserved.
Example
Option Explicit
'SharedTempUserData
'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.SharedTempUserData
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