Combines key value pairs from two collections of type Scripting.Dictionary.
Source Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
' @Author - Alexander Bolte' @ChangeDate - 2015-02-11' @Description - Combines the fields of two handed collections where fields' are understood as a key value pair.' @Param aColl - a collection of type Scripting.Dictionary holding values for' field labels, which are not available in collection 'bColl'.' @Param bColl - a collection of type Scripting.Dictionary holding values for' field labels, which are not available in collection 'aColl'.' @Returns a collection of type Scripting.Dictionary holding all key value pairs' from both handed collections for each unique key.FunctioncombineFields(aColl,bColl)' As Scripting.DictionaryDimbKey' As String()Dimi' As IntegerbKey=bColl.keysFori=lBound(bKey)TouBound(bKey)IfNot(aColl.Exists(bKey(i)))ThenaColl.addbKey(i),bColl(bKey(i))EndIfNextSetcombineFields=aCollEndFunction