Modules

ODBC Data Provider no longer connects after upgrading to macOS X Ventura 13.3

After upgrading to macOS X Ventura 13.3, the ODBC Data Provider will no longer be able to connect to the database, reporting a message such as ‘Driver’s SQLAllocEnv() failed’.  This is due to a change to security permissions in macOS, and should now be fixed in the 18.0.1 version of EasyCatalog for Adobe InDesign 2023.  […]

Developing an ImageLink Provider Script

This is intended to describe how to write a provider script. Overview The Plug-in enables connection to any DAM or online image resource via a provider script that manages interaction with its REST API. This is a single script containing a number of key callback functions, prefixed with cb_. Scripts are stored in locally in […]

Formatting Rule Regeneration Options

Regeneration options determine when the Formatting Rule is rebuilt. They can be rebuilt based on 3 options: When the rule changes. If the Formatting Rule has been updated since originally placed, it will be rebuilt. When the data changes. If any fields or records that make up the rule have been updated, it will be […]

Support for Custom Salsify Channels

For custom channels, EasyCatalog allows the creation of scripts that take channel data and turn into a record set which EasyCatalog can load.  Scripts are written in Lua. They take raw channel JSON and return a RECORDSET object. The name of the file should match the name of the channel, with a.lua extension. Scripts should […]

Applying Table Cell Attributes

The Table->Cell Options dialog box includes the ability to Apply Cell Style Named In. This allows a field to be defined that contains the name of a cell style. In addition to this, the field content can be prefixed to apply a specific cell attribute: TINT: Apply a tint value to the cell SWATCH: Apply […]

Custom Data Providers

Overview Through optional modules EasyCatalog provides a number of data providers (ODBC, XML, Excel, CSV, Sqlite).  The Enterprise Data Provider also provides additional connections to a number of third party systems.  For connections to other systems, such as JSON or REST APIs, the Enterprise Data Provider enables the ability to create custom data providers. Creating […]

Custom Menus and Dialogs

Overview Lua scripts can be integrated with EasyCatalog to provide custom menus and dialog boxes. User Interface is provided by the the InDesign Scripting DOM, which offers dialog creation and control. Details on how to access this from Lua are here. Creating a Custom Menu Option Adding a custom menu option is a case of […]

Accessing the InDesign Scripting DOM via Lua

Overview The InDesign Scripting DOM provides full access to the creation and manipulation of all content within InDesign. By combining this the speed of Lua with the data access and control facilities of EasyCatalog, it’s possible to create data driven content in virtually any format. Accessing The InDesign Scripting DOM can be accessed via Lua […]

What is a Matrix Table?

A matrix table is a table that expands both horizontally and vertically. The amount of rows and columns is determined by the number of unique values in the specified fields. Matrix tables are generally ‘look up’ tables. In the following example, the two products are available in three ‘colours’, two ‘finishes’ (‘gloss’ and ‘matt’) and […]

Matrix Table Configuration Dialog

EasyCatalog provides the ability to a create a matrix table — a table that expands both horizontally and vertically, populating data at the intersection of each column and row. A new dialog is available on the Table menu (on the data panel’s pop-out menu) to specify the more common matrix table parameters. Additional parameters are […]

Creating a Calendar using LUA

This example code creates a calendar tabular field using data where each record is an event on a calendar. The data has fields contain the month and year.  GROUPSCRIPT is used to call the script for each month group. This data can then be paginated using Master based pagination.

 

Custom Image Import

For images that are sourced externally but are not URL or File based, the “Custom” option can be chosen in the picture location section of the field options. When this is set, EasyCatalog looks for a file called ‘CustomImageImport.jsx’ in the ‘Scripts’ folder of a data source. Here’s a simple example that displays the field […]

Can I automatically rename an InDesign form field during pagination?

EasyCatalog can automatically rename form field items during pagination using a configuration specified using InDesign’s Script Label panel. Show the “Script Label” panel from the “Window > Utilities” menu Select the button form field in the document Paste the following into the “Script Label” panel

Deselect the form field in the document (deselecting ‘writes’ […]

Custom Relinking of Fields

The standard “Adopt Fields” method of relinking assumes field names and key field values are consistent between the existing links and the new data.  It was designed to link fields from one data source to another, and as such is limited to changing the key element of a link. In some circumstances it may be […]

Matrix Tables

EasyCatalog provides the ability to a create a matrix table — a table that expands both horizontally and vertically, populating data at the intersection of each column and row. Matrix tables are defined using commands in an XML format, specified using the Script Label panel with the table selected. There are three required nodes in […]

Using LUA commands to create an index/glossary

  Consider a data source with the following data. This example creates a glossary of all the words in the ‘Glossary’ field, showing the pages they appear on. The words are sorted alphabetically and the pages are numerical within each word. The resulting output looks something like: big – p 13,14, bill – p 13, black […]

Accessing Guide Based Pagination Progress on InDesign Server

There is a script called “PaginationProgress.jsx” which you can place in the Data Sources “Scripts” folder. This is passed script arguments: “datasource”  : The Data Source Name “stepindex”  : Current Step Index “stepcount” :  Total Number of Steps “step message” : Related Message You can access them like this: var stepCount = Number(app.scriptArgs.getValue(“stepcount”));

EasyCatalog Server and Salsify

The Enterprise Data Provider supports direct connections to a Salsify Data Sources.  The normal login procedure uses OAuth based authentication, which uses a browser to login to Salsify. InDesign Server does not allow user interaction, so an alternative method method is supported where a static ‘access token‘ can be used as part of the data source […]

Adding user defined parameters to an ODBC data source

ODBC data sources normally use a hard-coded query to retrieve data.  However, EasyCatalog allows elements of the query to be user definable or ‘parameter’ based.  These parameters are shown on the ‘info’ dialog box, accessible from the binocular icon on the data panel.  Any changes made are applied the next time the data is synchronized. Parameters are […]

Advanced Conditional Processing Using Lua

EasyCatalog supports an embedded version of the Lua programming language.  When text is processed, any commands between  delimiters [[ and ]] are processed using Lua. EasyCatalog supplements Lua with functions to make data access easier. For example:

In this example, if the contents of the ‘new’ field are equal to ‘1’ the text NEW! will be output. […]

Reapplying Pagination Rules during Update Document

By default, Pagination Rules are not re-applied during an Update Document operation.  However,  holding down a keyboard modifier while selecting the ‘Update Document’ menu can force them to be reapplied: Shift key: if a box contains any field that has been updated its Pagination Rules will be reapplied Shift + Alt key: Pagination Rules will […]

Importing XML Data that contains varying levels of grouping

XML data that contains categories and sub categories can be imported into EasyCatalog using the XML Data Provider module.  Sometimes, records may appear at different levels in the hierarchy of the XML (e.g. some products may be in a category > sub category > sub-sub category structure, others may be in at the category > […]

Using EasyCatalog to Create a Cross Table of XML Data

A common requirement is to construct a so-called Crosstab, in which multiple attributes are incorporated in a single table. For example, this data represents sets of trousers, with waist, length and price elements. XML Data:

The target layout involves a table with the distinct lengths horizontally, distinct waist sizes vertically and prices in each cell. This can […]

Computed Fields and Complex Tables

The movie below shows an XML Fragment being used to populate a series of fields and an entire table. The data sources is created with just two fields – one for the “Product ID” and one to contain the contents of the “ProductAttributes” node structure. XML Example:

Variations on the following “Computed Field” command are used […]

Get the name of the selected data source

While you can get the selected panel (DSV) object. To get the name of the data source, the parent object needs to accessed:

Setting pagination options via a script

The options shown on the “Paginate” dialog can all be set using the ‘setPaginationOption‘ scripting method which is available on the datasource object.  This method takes two parameters: the name of the option to set and the value to set it to.

The value used for the ‘name‘ parameter can be determined by examining […]

Referencing a field in a CALLSCRIPT script

Here’s an example CALLSCRIPT script that references record data passed to it:

Using a post image import script to manipulate an image

After EasyCatalog imports an image, it looks for a script called “PostImageImport.jsx” in both the Data Source->Scripts folder and the EasyCatalog Workspace Folder->Scripts folder. This can be used to manipulate an image after import. The example below applies the DETECT EDGES clipping path setting:

Do you have an example URL based XML data source?

Here’s a link to some sample XML data which can be loaded into the XML data provider: http://www.w3schools.com/xml/plant_catalog.xml

  Here are the data source configuration settings required to load this data:  

Is there any way to work with smaller sets of ODBC-based data?

ODBC Data Sources can be configured to accept parameters which are included as part of the data-retrieval SQL. Parameters should be placed in {{ braces }} for example:

This will create two parameters that user can change: “Name” and “No Of Records”.  Up to five can be specified. The values for these parameters will be […]

Why are fields shown in red?

Fields are red because the record they relate to cannot be identified. Normally the column ‘rowid’ use used to link the query result data back to original record, but in certain queries this isn’t possible – when using the DISTINCT clause for instance. In this case the field is marked in red and once placed […]

Loading XML into a field

EasyCatalog has the ability to load fragments of source XML into a field. This is specified using the “Load as XML Fragment” check box as shown on the “Field Configuration” dialog: When this is checked the entire XML structure at the specified location is loaded into a field. This can be used by the complex […]

Using a Relational Data Source in an XML Data Source

Data sources created with the Relational Module can be used as sources of XML Data. The heirarchy modelled in the relational data source is rendered into XML, which can then be used in a regular EasyCatalog panel via the XML data provider.