Returning the Named Data Sources in the Response |
Users who are developing business solutions connecting BarTender with other products (such as ERP packages) need an automated means of discovering the variables (Named Data Sources) available in a BTW file. The GetFormatProperties BTXML command provides that needed information.
For more information, refer to The GetFormatProperties Tag.
The following example shows the response that is returned when the GetFormatProperties tag is run.
<?xmlversion="1.0"encoding="utf-16"?>
<ResponseVersion="2.0"AppName="BarTender"AppVersion="2022 R6"AppVersionId="1130"AppVersionMajor="11"AppVersionMinor="30"AppVersionBuild="233295"AppInstancePid="22604"AppInstanceGUID="{A50B0C4A-7307-472B-9533-0AD51B15BA30}">
<User>Administrator</User>
<Server>MyServer</Server>
<CommandName="Job1">
<GetFormatProperties>
<NamedDataSources>
<DataSourceID="{810DD6A6-7959-41DB-BCD9-9947147486C7}"Name="BarcodeData">
<Value>12345678</Value>
</DataSource>
<DataSource ID="{8526CE3A-5C73-44C6-B289-7406A8C718DC}" Name="CompanyName">
<Value>Company Name</Value>
</DataSource>
</NamedDataSources>
<PrintSetup>
<PrinterName>PRTUSWA113-HP LaserJet 425 in Dev</PrinterName>
<PrinterNameSource>PrintDialog</PrinterNameSource>
<AutoPrintAgain>false</AutoPrintAgain>
<EnablePrompting>false</EnablePrompting>
<SupportsIdenticalCopies>true</SupportsIdenticalCopies>
<IdenticalCopiesOfLabel>1</IdenticalCopiesOfLabel>
<SupportsSerializedLabels>false</SupportsSerializedLabels>
<NumberOfSerializedLabels>1</NumberOfSerializedLabels>
<StartingPosition>0</StartingPosition>
<PromptForStartingPosition>false</PromptForStartingPosition>
<StartingPositionRow>0</StartingPositionRow>
<StartingPositionCol>0</StartingPositionCol>
<StartingPositionUsesRowColumn>false</StartingPositionUsesRowColumn>
</PrintSetup>
<PageSetup>
<LabelRows>7</LabelRows>
<LabelColumns>2</LabelColumns>
<RulerUnits>Inches</RulerUnits>
<PaperWidth>
<Mils>8500</Mils>
<Millimeters>215.900</Millimeters>
<Centimeters>21.590</Centimeters>
<Inches>8.500</Inches>
</PaperWidth>
<PaperHeight>
<Mils>11000</Mils>
<Millimeters>279.400</Millimeters>
<Centimeters>27.940</Centimeters>
<Inches>11.000</Inches>
</PaperHeight>
<MarginTop>
<Mils>500</Mils>
<Millimeters>12.700</Millimeters>
<Centimeters>1.270</Centimeters>
<Inches>0.500</Inches>
</MarginTop>
<MarginBottom>
<Mils>581</Mils>
<Millimeters>14.757</Millimeters>
<Centimeters>1.476</Centimeters>
<Inches>0.581</Inches>
</MarginBottom>
<MarginLeft>
<Mils>250</Mils>
<Millimeters>6.350</Millimeters>
<Centimeters>0.635</Centimeters>
<Inches>0.250</Inches>
</MarginLeft>
<MarginRight>
<Mils>2738</Mils>
<Millimeters>69.545</Millimeters>
<Centimeters>6.955</Centimeters>
<Inches>2.738</Inches>
</MarginRight>
<LabelShape>Rectangle</LabelShape>
<LabelCorners>RoundCorners</LabelCorners>
<StartingCorner>TopLeft</StartingCorner>
<StartingPositionDirection>Horizontal</StartingPositionDirection>
<StartingPositionSelectionMethods>LabelNumber</StartingPositionSelectionMethods>
</PageSetup>
<PasswordProtections>
<OpenDocument>false</OpenDocument>
<SaveDocument>false</SaveDocument>
<SaveCopyOfDocument>false</SaveCopyOfDocument>
<Print>false</Print>
<ModifyTemplateDesign>false</ModifyTemplateDesign>
<ModifyProtectedVBScript>false</ModifyProtectedVBScript>
<ModifyPrintDialogOptions>false</ModifyPrintDialogOptions>
<ModifyPageSetup>false</ModifyPageSetup>
<ModifyDatabaseSetup>false</ModifyDatabaseSetup>
<ModifyLayers>false</ModifyLayers>
<PasswordHint/>
</PasswordProtections>
<FeatureNotCompatibleInSaaS>None</FeatureNotCompatibleInSaaS>
<DatabaseSetup>
<DatabaseConnections>
<DatabaseConnection Name="@1" Type="TextFile">codepage=20127;pathname=E:\tests\Assets.csv;format=Delimited;delimitation=UserDefined;field count=6;first record is header=True;additionalfieldsprefix="Field ";delimiter=,;record separation=LineBreak;fieldsquoted=false</DatabaseConnection>
</DatabaseConnections>
<RecordSets>
<RecordSet Name="Assets" Connection="@1" Primary="true">
<SelectCommand Custom="false">SELECT * FROM [Assets] WHERE [Assets].[Assets].[Text1] = ‘?QueryPrompt1’</SelectCommand>
<ProviderParameters></ProviderParameters>
<LastKnownSchema>
<Field Name="[Assets].[Assets].[Company]" Type="String" used = “true”/>
<Field Name="[Assets].[Assets].[Text1]" Type="String" />
<Field Name="[Assets].[Assets].[Text2]" Type="String" />
<Field Name="[Assets].[Assets].[Text]" Type="String" />
<Field Name="[Assets].[Assets].[Barcode]" Type="String" used = “true”/>
<Field Name="[Assets].[Assets].[Field 6]" Type="Int32" />
</LastKnownSchema>
<FilterVariables>
<FilterVariable Name="?QueryPrompt2" SourceType="QueryPrompt" DefaultValue="d009" />
<FilterVariable Name="?QueryPrompt1" SourceType="QueryPrompt" DefaultValue="d009" />
<FilterVariable Name="?DId" SourceType="NamedDataSource" DefaultValue="Sample Text" />
</FilterVariables>
</RecordSet>
</RecordSets>
</DatabaseSetup>
<Forms enabled = “true”/>
</GetFormatProperties>
</Command>
</Response>