LocalJoins (Collection)

Member of:

DataModel object

Description:

Enables you to derive the Topic Name of a topic item in a join or local join. You can also retrieve the Topic Item Name for a joins (not a local join).

Tip:

All collections have the “Item(NameOrIndex)” method. This is the default method for all collections that returns collection items at a particular index or by name. Use brackets ([]) to represent calls to the Item (Method). For example, these statements are identical: myItem = Documents[1] myItem = Documents.Item(1) myItem = Documents["StartUp.bqy"] myItem = Documents.Item("StartUp.bqy")

Example 1:

This example shows how to use a simple equal join:

Topic1=ActiveDocument.Sections["Query"].DataModel.Topics["Sales Fact"]. TopicItems.Item(2)
Topic2=ActiveDocument.Sections["Query"].DataModel.Topics["Products"]. TopicItems.Item(1)
ActiveDocument.Sections["Query"].DataModel.Joins.Add
(Topic1,Topic2,bqJoinSimpleEqual)

Example 2:

This example shows how to use a simple equal join to join topics 1 and 2 in a local results set:

LRTopic1=ActiveDocument.Sections["Query2"].DataModel.LocalResults["1"]. LocalResultTopicItems.Item(7)
LRTopic2=ActiveDocument.Sections["Query2"].DataModel.LocalResults["2"].
LocalResultTopicItems.Item(7)
ActiveDocument.Sections["Query2"].DataModel.LocalJoins.Add(LRTopic1,LRTopic2, bqJoinSimpleEqual)

Methods:

Add([TopicItem1 As BaseTopicItem], [TopicItem2 As BaseTopicItem], [Type As BqJoinType] As LocalJoin), Item(NameOrIndex) As LocalJoin, RemoveAll()

Properties:

Read-only: Property Count As Number