Named Datasource for Pictures
I'm trying to implement a Bartender integration using the REST API.
If I'm not completely wrong, I have to use named datasources for the fields. Everything works fine when using "normal" field types. But it is not possible to use a named datasource for pictures.
What can I do better?
Thank you for reaching us via the Community Forums!
We saw you also created a ticket with our Technical Services and will be copying their answer here in the forums so it might be of use to other Community members with the same query:
Each and every BarTender object (text field, barcode, pictures) can contain one or more data sources.
A data source, in the context of the BarTender application, is the location where the data that is being used comes from.
BarTender supports a variety of data sources, including local and global databases, external files, object values, Visual Basic scripts, printer code templates, a system or printer clock, and embedded data.
Embedded data as a data source type is fixed content that allows you to manually insert a value into an edit box using a keyboard. The inserted value remains unchanged on every printed label.
A Named Data Source is a data source that you have given a name so that its value can be used by any objects or scripts in the BarTender document.
In addition to the above, a Named Data Source can also be used as a placeholder to pass the value from outside inside the label. In this specific case, for example, the web request data will be passed to the BarTender Rest API, which passes the data to the named data sources of the specified BarTender document. The Named Data Sources then populate the text object and the barcode object on a document at print-time.
Now, since your BarTender label is not fetching data from the database connected to it, but instead you are passing the values through every web request, I guess you don't need to use a data source based on the database field in this case. Therefore, as already mentioned, using the embedded data sources (which you have given a name) should be more than enough.
As for the documentation on the new BarTender Rest API, if you haven't already done so, I suggest you take a look at the help system integrated into the suite and...
...to access the ReDoc tool at http://localhost:5159/api/actions/reference/index.html. This utility provides an explanation, an execution environment for testing requests, and explanations for each function.
Besides this, I wanted to let you know that we are currently working on improving the current documentation and add adding content regarding this new feature.
In the meantime, to fully understand the mechanism described above, I invite you to take a look at the following video which shows how
setting up a web service integration with JSON data but through our middleware application instead, that is Integration builder.
Building a web service integration (Video - 33:10)