Beta Features
Using Formatting Rules With ExtendScript
During placement of a Formatting Rule ‘Post Processing’ can be used to modify the contents of the Formatting Rule. In this example, a script creates a pie chart based on the values in a data source. This requires the scripting module as objects are passed to represent the data which is assigned to to the […]
Custom Formatting Of Numeric Values
A custom format allows the specification of how numeric values are formatted, for example:
1 2 3 4 5 6 7 | [DECIMAL=.] [THOUSANDS=,] [PRECISION=2] [PREFIX=$] [SUFFIX=] [REMOVE=.00] [STRIPTRAILINGZEROS=YES] |
Where the data contains values of a different types, each can be formatted independently. Take fields containing:
1 2 3 4 | โฌ12 12 EUR 12 USD 10.5 KG |
Each type has an identifier used to pick the correct formatting options. This contains a regular expression. When matched to the data, […]
Placing fields inside tabular fields
Tabular field cells normally contain text, which has limited formatting. ย To overcome this fields can be assigned to individual cells:
1 2 3 | t = TABLE.new(); t:cell(1,1):setcontent(FIELD.get('Category')); t:present(); |
For group tabular fields, the tableof method returns a table with fields automaticallyย assigned. Take this data for example:
1 2 3 4 5 6 7 8 | Sku, Group, Images 1, Social, twitter 2, Social, facebook 3, Media sharing, flickr 4, Media sharing, instagram 6, Media sharing, pinterest 7, Social, linkedin 8, Blogging, tumblr |
In this example, we’ll create a custom field to collect all the Images for each […]
Grouped Tabular Fields
Grouped tabular fields allows the collation of records sharing common properties. Take this data for example: To create a custom field that collates records sharing the same PRICE, the following is configured: A simple script is used to pick out the ID column:
1 2 3 4 5 6 7 8 | -- Get the records in the group r = RECORDSET.getgroup(); -- Create a table of IDs t = r:tableof("ID") -- Return the table t:present(); |
Notice the Group Path: has been configured with the […]
Formatting Rules Combined With Tabular Fields
Tabular field cells can be inserted as links in a document. However when a parent field is inserted, EasyCatalog normally creates a table of individual fields for each cell. Specifying a Formatting Ruleย changes this behaviour. When the parent field is inserted, ย a single link is created containing the populated formatting rule. All links are removed, […]
Formatting Rule Fields
The Formatting Rule field type enables a field to create content based on a stored Formatting Rule: When the field is inserted, the named rule is populated and inserted between text markers without any tags (tags within tags are not allowed). When Repeat For Each Line is enabled, the rule will be populated once for […]
Inserting Images as Anchored Frames
When a field contains the an image or multiple images, it’s possible to insert these as anchored items inside a text based link. To do this, enable the “Insert as inline” checkbox on the Picture Content section of the Field Options: To control the size and appearance of the frames, an Object Style can be […]
Formatting Rules – Duplicating a Frame for Each Cell of a Tabular Field
Sometimes is useful to break out things like colours into a tabular field and then populate these as a set of frames, one for each colour. The frames might contain a Swatch and a swatch name. The example below iterates though the Colour tabular field, duplicating the frame given the Script Labelย group. It then populates […]
Replacing Delimited Field Names With Field Content
The example below replaces field names delimited between { and } with the field content. E.g: “This is a field with another field {name} inside” The replaces “name” with the contents of field called “name”.
1 2 3 4 5 6 7 8 9 | -- Searches a field called "name" for fields delimited -- between { and } and replaces them with field content str = field(name) while str:match("{(.-)}") do word=str:match("{(.-)}") str = string.gsub(str, "{" .. word .. "}", field(word)); end return str |
Generate InDesign Based QR Codes
Introduction The contents of a field can be output as a QR Code using InDesign’s QR Code functionality. EasyCatalog includes support for all of the QR Code types supported by InDesign, although some types require the use of a custom field to provide the content of the QR Code. As of version 18, EasyCatalog includes […]