ChangeDataSource Tag |
Enables users to change to a named data source.
<ChangeDataSource ObjectName=Value Index=Value>...</ChangeDataSource>
The supported attributes include the following.
|
Attribute |
Required/Optional |
Description |
|---|---|---|
|
ObjectName |
Required |
The name of the object to be changed. |
|
Index |
Required |
0-based number of the data source index. Since some objects have multiple datasources, this makes sure the user grabs the intended object. This information is included in the <GetFormatProperties> and <IncludeObjectDataSources> tags. |
The following child element tags are supported.
|
Tag |
Required/Optional |
Description |
|---|---|---|
|
Required |
Points to the name of the Named datasource and is used to switch the datasource. |
<ChangeDataSource> is an optional tag that is used with the <FormatSetup> command.
This example demonstrates the <ChangeDataSource> tag changing the data sources for two different text objects.
<?xml version="1.0" encoding="utf-8"?>
<XMLScript Version="2.0" Trusted="true">
<Command>
<FormatSetup>
<Format SaveAtEndOfJob="true">full path\Document1.btw</Format>
<ChangeDataSource ObjectName="Text 2" Index="0">
<UseNamedDataSource>DS2</UseNamedDataSource>
</ChangeDataSource>
<ChangeDataSource ObjectName="Text 1" Index="0">
<UseNamedDataSource>DS3</UseNamedDataSource>
</ChangeDataSource>
</FormatSetup>
</Command>
</XMLScript>
BTXML Script version 1.0 (BarTender 8.0 and later versions)