The ClassID of the panel and its objects is 3.

Products are distinguished by (unique) IDs. Each Comet ID consists of three numbers and a string. The first number of the Comet ID must be greater than 0, the other two numbers must be ≥ 0:

IDs are only equal if all three numbers and the string are equal. To avoid errors, it must be ensured that the Comet IDs are unique and that the first three number fields are intergers. The comparison of the StringIDs is case sensitive.

Comet IDs are used in many different contexts. By far the most common use, however, is as a product ID of the placeholder : When linking a document placeholder with a product, the Comet ID of the product is transferred completely and unchanged to the document placeholder. This Comet ID can later be used to identify the product and update it using the placeholder's load action. The currently set Comet ID of a placeholder is shown in the panel Placeholder Options. If the placeholder is selected in the document and the product is visible in the panel Product Pool, the list entry in the panel is selected.

The Comet IDs are also used in Documents and Publications and in Comet Hyperlinks. Descriptions of how to read and set these Comet IDs can be found in the documentation of the respective functions and objects.

In placeholder scripts and scripts of the table module the content of current Comet ID can be requested as follows:

cScript Environment Variable Statement-<Tag>
ID gRecordID <ID>
ID2 gRecordID2 <ID2>
ID3 gRecordID3 <ID3>
StringID gRecordStringID <STRINGID>

Please also note the following information about StringIDs in the Table Module and in connections to PublicationServers!

So-called Multi-StringIDs can be made from the StringIDs via the Table Module. Up to three individual StringIDs are joined together, separated by |--|. Scripts must not place multi-stringIDs in placeholders.

In placeholder scripts and Table Module scripts the contents of the three parts of a Multi-StringID can be queried with the global variables gRecordStringID1, gRecordStringID2 and gRecordStringID3. In direct queries of placeholders and the Table Module, the contents of the three parts of a multi-stringID can be accessed with the <STRING1>, <STRING2>, <STRING3> tags.

Publication Servers usually use only the StringIDs to identify the products and always set the three numbers of the Comet IDs to

    1, 0, 0, "stringID"

The formatting of the StringIDs follows uniform rules. A full description and how to access the individual parts of a PubServer stringID can be found here.

Products can be dragged by their name part into the panel Products Of Document. To insert products in InDesign® documents, they are dragged by their icons.

The following table describes all actions and key combinations that are supported when dragging and dropping products into documents. If you hold down the H key, the following table is also displayed directly during drag and drop. You can also find help on dragging and dropping products in the Tool Hints panel when the Selection Tool is selected.

Destination Mac Windows Description
H Show this help
Unlinked Text, End of Text Normal Insert the product template into the text flow.
In the placeholder panle, at least one entry is marked with an eye. Insert, link and load the marked placeholder for each product. The content of search field 2 is used as separator (/r = end of paragraph, /n = softreturn, /t = tab).
Text Placeholders Link and load the placeholder with the first product.
Graphic Frames Link and load the target frame with the first product.
SHIFT Over Text Frames Relink and load all placeholders of the frame. If the frame is part of an InDesign group, all other frames of the group will also be processed.
Free Area ALT Y Insert product template
+ CMD + A Reorganize page after inserting
+ CMD + SHIFT + A + SHIFT Place product template at the top left of the page element
+ Leerzeichen Use continuation template
Table Cells CTRL STRG Relink and load rows starting from drop column. Excess products are ignored.
+ CMD + A Relink and load rows starting from drop column. New lines are created for surplus products.
+ ALT + Y Relink and load columns starting from drop row. Excess products are ignored.
+ ALT + CMD + Y + A Relink and load columns starting from drop row. New columns are created for surplus products.
ESC Abort

The following table describes the panel statements that can be used to configure the loading of products:

ClassID ID Description Remarks
3 7 Search of list entries This statement is only used in versions < 1.1.9 (without Treeview). New versions use the statement 55.
8 Load individual entries
3 55 Load top level entries The command loads IDs and content of the products. The command also returns the ID of the panel statement that can be used to load the subentries. The command may contain instructions to label the search fields.
3 >= 10000 Load subentries Command to load subentries
18 95 Load the ID of the script to be executed on double-click of a product.

To load products into the treeview this mechanism is used:

  1. Load the top level products with panel statement 55. This (and only this) statement evaluates the search criteria.
  2. Every object of every level gets a panel statement ID >= 10000 which makes it possible to load the subentries.
  3. An entry is not further expandable if the panel statement for the subentries is 0.

The real command for loading depends on the type of the data connection. ODBC connections expect an SQL SELECT statement, XML datapools an XML SELECT command, SOAP connections expect a getProductList command.

Since only panel statement 55 (toplevel) evaluates search criteria, only this stament has input values which must be marked in the command with ?. These parameters are expected.

Parameter Type Description Remarks
1 int Limits the ID to ID > 0 is always replaced with 0 by the plugin
2 string Content of the first search field with appended % only default search. For more search criteria see here.
3 Content of the second search field with appended %
4 int rownum < is always replaced with 10,000 by the plug-in

All statements use the same kind of return values.

Column

standard / SOAP

Parameter Type Description Remark
1 1 ID int Unique ID of the data record. With the ID of the data record the status (+, x, ...) of the product is set in the panel.
2 2 ID2
3 3 ID3
4 - StringID char* NOT ON SOAP (Use column 17 for StringIDs in SOAP)

For usage of the StringID two conditions must be met:

  1. Definition of the table attribute hasstringids in the table panelstatements or definition of the XML element hasstringids in the file panelstatements.xml, see StringIDs
  2. In the definition of the panel statements the value of hasstringids must be 1.
5 4 classID int Internal ClassID of the object Not used yet
6 5 iconID int Number of the icon to be used for the object You can find a full list of available icons here.
7 6 1. Column string Values displayed in the panel list
8 7 2. Column
9 8 forceDelete int Object state >0 : If the object is not planned for in the document it is not inserted into the product list. If the object is planned for in the document it is deleted from the list if all links to this product have been removed from the document.

0 : Product that can be commonly planned

<0 : The object is not to be planned for in the document. The link button is deactivated and the object is not tested when states are tested with .

10 9 panelStatementID int >= 10000, reference of a panel statement of the same type which can be used to load subentries. If the value is 0 the object can not be expanded.
  • The following returns are optional (except for SOAP calls to getProductList and products with StringIDs) and are used for product build-ups

  • If the parameters in the top-level statement (usually the panel statement 55 or a FindStatement) return these parameters, all statements for loading the subentries must also fill the parameters.

  • When calling the SOAP method getProductList and using StringIDs, the parameters must be specified. Set their values to 0 or "" if necessary.
11 10 docID int ID of the document The parameter is currently unused and can be filled with 0.
12 11 masterpage string Name of the master page in the form prefix-name (e.g. "C-Doublepage") If during product creation a new page must be created for this product this master page is used. If the master page does not exist or the value is empty the default page of the creation is used.

Value is used in grid orientated product builds only. On page template based builds, master pages are defined by the page templates itself.

13 12 reserved string

Enter the value "" here.

Since v4.1.6 R26627 Infos1 and Infos2 of the placeholders in templates. The information is inserted into all frame and/or text placeholders of the product template before the placeholders are loaded. The information is given in the following format:

### apply_info1 'info1' apply_info2 'info2'

with the following values:

  • ### : Introductory mark
  • apply_info1
    • 0 : Ignore info1
    • 1 : Set info1 into all text placeholders
    • 1 : Set info1 into all frame placeholders
    • 1 : Set info1 into all text and frame placeholders
  • info1 : Value of Infos1 of placeholders
  • apply_info2
    • 0 : Ignore info2
    • 1 : Set info2 into all text placeholders
    • 1 : Set info2 into all frame placeholders
    • 1 : Set info2 into all text and frame placeholders
  • info2 : Value of Infos2 of placeholders

The following example sets "aaa" in Infos1 and "bbb" in Infos2 of all placeholders of a product:

### 3 'aaa' 3 'bbb'

To set Infos1 and Infos2 in cScript please use product::set with the kaywords

  • kProductApplyInfos1, kProductInfos1
  • kProductApplyInfos2, kProductInfos2
14 13 Customized icon string Customized icon "" or definition of a customized icon for the product. If the field is not empty, the entry iconID from column 6 (or 5 in SOAP) is ignored.
15 14 pagetemplateID int Create a new page with the given page template before building the product

0 or valid ID of a page template. In the panel the name of the page template is shown behind the template name:

    Template@Pagetemplate

Use this option rarely: Specifying a page template automatically creates a new page before inserting the product during product buldings.

16 15 reserved int Enter the value 0 here.
17 16 pageItemID int Template used for inserting the product

Templates are detected depending on the page: If the used template is limited to left pages but also defines right pages, on right pages the right templateis used.

If the value is 0 or if the template does not exist the default template of the creations is used.

- 17 stringID string StringID of product SOAP ONLY

For usage of the StringID two conditions must be met:

  1. Definition of the table attribute hasstringids in the table panelstatements or definition of the XML element hasstringids in the file panelstatements.xml, see StringIDs
  2. In the definition of the panel statements the value of hasstringids must be 1.

The commands support the whole set of panel statment tags like <user>, <now>. Here you can find a complete list of the variables.

In order to reference the values of higher level objects when subentries are loaded additional variables are supported in the statements.

Name Type Description Remarks
parent.ID int ID of the parent record With parent.parent the parent record of the parent record is referenced (etc.).
parent.ID2
parent.ID3
parent.StringID string
parent.classID int internal ClassID of the parent record
parent.Row1 string List text of the parent record
parent.Row2
parent.ForceDelete int Forcedelete value of the parent record

You can also use the current values of the search fields of the panel on every level. The image shows the tags assigned to the search fields. If a search field is empty the tag gets the value "%", otherwise it gets the exact value of the search field (i.e. not converted into upper case).

The statements have the same rows for the database and xml and for top level and subentries. But for XML and all subentries (database and XML) the order of ClassID and IconID is exchanged: ... IconID, ClassID, ...

To rename search fields or fill them in on start use this mechanism.

As of version 1.4.2 R 504, the entries of the product pool can be provided with their own icons. The following table gives a complete list of all supported sources:

Key word Source Description Transparency Example
ImagePath

Local file system (LAN)

Full path to the image file

Path may start with valid alias names for folders.

no

ImagePath : "$DESKTOP/Images/aaa.png"

IconPath

White

ImageURL

Internet

Valid URL of image file

No

ImageURL : "http://www.hi13.de/tantarantana.jpg"

IconURL

White

SOAPImage Current SOAP Connection

fieldID of image file of SOAP service

There must be a SOAP connection.

No

SOAPImage : "icons/123"

SOAPIcon

White

Attention : There must be a space before and after the colon in all cases.

Images are automatically scaled so that they are fully visible. If you use non PNG formatted images, we store a scaled version of the images locally on your computer:

$PREFS/Werk [2]/CS_VERSION/ProductPreviews/17x 17/... with CS_VERSION equals CS6 for ID CS6, CS7 for ID CC, CS8 for ID CC 2014 and so on

This folder or any entries in this folder may be deleted - then previews are automatically regenerated if required. But do never change any file of this folder! The images, even if they have known image formats, are not readable by other graphics programs.

To make icons always visible on the dark and light user interfaces of InDesign® CC, different icons must be used for light and dark surfaces. You may use the same information for ImagePath till SOAPIcon. But since CC, we automatically try to find the following variants of the images:

If the required variants are not found, the master file without additional name extension is used.

Also the transparency can of course no longer be white based with different UI colors. Therefore always use PNG images with alpha channel for transparency. The specification Image- or Icon- is equivalent in this case. Here is a sample image with the same colors used for the priint:comet icons:

    

You can use systemundependent / or \ as path separator.

When using \ as a path separator, please remember that this character, as in strings as usual, must be masked with \, i.e. must be specified as \\. But since most programs for processing database contents also expect \ to be doubled, you also have to double the doubles. Or, in other words: Instead of a single \ you must write four \\\\.

    select
      1, 0, 0, a.id,
      3,
      2020,
      a.label, '''',
      0,
      10000,
      0,
      ''A-Master'',
      '''',
      ''ImagePath : "
\\\\Users\\\\paul\\\\Desktop/Images/buffer.png"'',
      0,
      0,
      0
    from comet_container a, comet_planningtypes r
    where a.container_id=''0'' and a.active = 1 and r.keyname = a.type_name
    order by sort, label

Icons for products can be installed locally in your InDesign®. To do this, use the script command prefs::install_image with the parameter destination set to "products". Please note, however, that locally installed icons are only visible in the executing InDesign® and will be lost when the priint:comet plugins are reinstalled!

Here are two examples for SQL and XML.

First the panel statement 55 for loading of all top level objects.

select ID, 1401, 1702,
   3,      -- unused
   2012,   -- House
   Num, Name,
   ForceDelete,
   10000,  -- Load the subentries
   0, '',
   '', '', 0, 0,
   7       -- Template 7
from WIIProducts
   where        ID > ?
      and       upper (num) like ?
      and       upper (name) like ?
      and       rownum < ?

Load the second level objects.

select     ID, <parent.ID>, 123,
   2009,                                -- Cog
   ObjectType, 
   Name, Value, ForceDelete,
   10001, -- Load the subentries
   0, '',
   '', '', 0, 0,
   7 -- Template 7
from            WIIElements
where   productID = <parent.ID>
union
select ID, <parent.ID>, 123,
   2010,                                -- No passing
   ObjectType,
   Name, Value, ForceDelete,
   10001,
   0, '',
   '', '', 0, 0,
   7 -- Template 7
from            WIIElements2
where   productID = <parent.ID>
	       
union
select ID, <parent.ID>, 123,
   2011,                                -- Heart
   ObjectType,
   Name, Value, ForceDelete,
   10001,
  
   0, '',
   '', '', 0, 0,
   7 -- Template 7
from            WIIElements3
where   productID = <parent.ID>'

Load the third level objects.

select 1, 1401, 1702,
   2003,        -- Bulb
   -1,
   <parent.Row1>||' '||to_char(<parent.ID>),
   <parent.Row2>||' '|| to_char(<parent.ID2>),
   0,
   0,     -- No more subentries
   0, '',
   '', '', 0, 0,
   7 -- Template 7
from dual
union
select 1, 1401, 1702,
	               2002,   -- Book with pencil
   -1,
   <parent.Row1>||' '|| to_char(<parent.ID>),
   <parent.Row2>||' '|| to_char(<parent.ID2>),
   0,
   0, -- No more subentries
   0, '',
   '', '', 0, 0,
   7 -- Template 7
from dual

The statements for XML are made in the same way as panel statements. Some differences must be observed:

  1. To simulate the SQL statement union multiple panel statements can be defined with the same ID. These statements are executed in sequence. For ordering the entry usage of the panel statements is used. verwendet.
  2. The file name for the XML statement can be a value defined in the file datafiles.xml or in the plug in Data files. To use a defined (and activated) data file prefix the alias name of the data file with $.

Here is an example entry supporting StringIDs . The definition parts with an orange background return a StringId. The return value of id is automatically translated into a string. In order for the subentries to be loaded the panel statement 10001 has to be defined.

<panelstatement>
    <id>10000</id>
    <usage>1</usage>
    <domain></domain>
    <statement>
        "$MYFILE"
        select id, &lt;parent.ID&gt;, 123, id
            objecttype,
            2009,
            name, value, forcedelete,
            10001,
            docid,
            masterpage,
            grid.name, grid.elem, grid.id, grid.elemid,
            pageitemid
        node elements.element
        where productid = &lt;parent.ID&gt;
    </statement>
    <in_parameters></in_parameters>
    <out_parameters></out_parameters>
    <description>Load subentries</description>
    <hasstringids>1</hasstringids>
</panelstatement>

SOAP services must implement a special command for loading (sub)product lists. You can find a full description of the SOAP service here. The plug in can use four methods of the soap connection:

  1. getProductList Load the top level products.
  2. getProductList1 Load the top level products, string parameters are not quoted.
  3. getSubProductList Load the subentries of a product.
  4. getProductList Load the subentries of a product, string parameters are not quoted.

This example demonstrates a valid SOAP statement to load the top level products (panel statement 55):

<panelstatement>
   <id>55</id>
   <usage>Load the products of the product pool as treeview</usage>
   <domain></domain>
   <statement>
      getProductList id > ? and name like ? and num LIKE ?
   </statement>
   <in_parameters></in_parameters>
   <out_parameters></out_parameters>
   <description></description>
</panelstatement>
Contrary to the just described statements for database connections and XML data you can not specify which panel statement is to be used for loading the sublevel entries in the SOAP statement getProductList. This definition is done on the server. If the server returns e.g. 20000 the panel statement could look like this:
<panelstatement>
   <id>20000</id>
   <usage>Load sublevel products SOAP</usage>
   <domain></domain>
   <statement>
      getSubProductList id = <parent.ID>
   </statement>
   <in_parameters></in_parameters>
   <out_parameters></out_parameters>
   <description></description>
</panelstatement>

This example describes a valid pair of panel statements 7 and 8 which can be used to load products of a panel. When adapting theses statements care has to taken that the new statements have the right return rows and input variables. The next pictures demonstrate at which place of the selects panel values and return values are to be inserted. corresponds to [1] in the statement, corresponds to (1) in the statement.

In statement 2 for demonstration purposes the tag <userid> is used. This tag will be replaced before the statement execution by the ID of the current user. More defined tags are available here.

insert into PanelStatements values (
	       7,
	       '',
	       'Load the IDs for the product pool',
	       'select ID, 1401, 1702
	       from WIIProducts
	       where   ID > ?                      -- 0 from plug-in
	               and     upper (num) like ?  -- [1]
	               and     upper (name) like ? -- [2]
	               and     rownum < ?',        -- 10,000 from plug-in
	       'number, varchar2, varchar2, number',
	       'number, number, number');
	       
	insert into PanelStatements values (
	       8,
	       '',
	       'Load one product in the product pool',
	       'select
	               Num,    -- (1)
	               Name,   -- (2)
	               ForceDelete
	        from WIIProducts where ID = ?',
	       'number',
	       'varchar2, varchar2, number');

The value of ForceDelete controls the look of the state button: If ForceDelete is != 0, the status is set to 'Can be deleted'. If the product is no longer placed in the document it is not loaded into the list. If it is still existing in the document and is deleted from the document, the corresponding entry is automatically removed from the list of products.

The entries on the list can react to double clicks. The action to be performed is defined as follows:

  1. With the help of panel statement 95 an action ID is assigned to the product. The statement must provide an integer and can take up to four input values (int, int, int, varchar) which get replaced by the current product ID. In the statement in addition to the commonly used tags like <ID>, <ID2>, <folder> the tag <depth> is defined; it contains the (0-based) level of the product.
  2. If an action ID is defined (>0) the action is evaluated as a script. In the script an additional global variable gClicked is defined which contains the 0-based line number of the entry.

Here are some examples of valid panel statements which can be used to define a valid double click ID.

select 900+<depth> from dual;
"datafiles.xml"                        -- some XML file
select 900+<depth>
select id%3 from ... where ID = ?       
select id%3 from ... where ID = <ID>   -- The ? are optional

And here a simple double click script

int main ()
{
    showmessage ("Zeile %d, ID = %d",
          gClicked+1,
          gRecordID);
    return 1;
}

At the right top of the panel is a pop-up menu that contains the (alphabetically sorted) available templates. With two small pop-up menus on the left before the pop-up, this list can be limited to domains and the so-called clients. Nevertheless, the list can quickly become confusingly long.

Panel statement 148 can be used to automatically filter the list. The statement is available from v4.1.8. R27979 and must be a cScript. The filter script is executed at each login/logout and at each document change. It receives a list with the IDs of all currently available templates. Unnecessary entries are removed from the list by the script and the remaining templates are inserted in the popup. The filter script can be deactivated (and reactivated) with the help of the flyout menu Do NOT filter list of templates. When InDesign® is restarted, the filter function is always activated.

Name Type Description
gDocument ItemRef

Current front document

gTemplateIDs List

List of the IDs of the available templates. Templates that are not to be shown in the pop-up of the panel are removed from the list by the script.

PubServers have a standard version of the script: The publication of the document is determined via the document ID and the result list is filled with the templates assigned to the publication.

The example shows a simple script that always displays only those templates that begin with the same letter as the file name.

int main ()
{
    char docName[512];
    char tName [512];
    int i;
    int len = list::length (gTemplateIDs);

    document::name (docName);
    strlower (docName);

    if (len > 0 && strlen (docName) > 0)
    {
        for (i = len-1; i >= 0; i--)
        {
            strcpy (tName, datapool::get_template_name (list::get (gTemplateIDs, i)));
            strlower (tName);

            if (docName [0] != tName [0])
            {
                list::remove_pos(gTemplateIDs, i);
            }
        }
    }
    return 0;
}

To search for products, different methods are used. Three types of search methods are distinguished.

  1. Standard search
  2. Pre-configured search methods
  3. Custom search methods

In the following figure the red marked entries are pre-configured and the blue marked entries are custom searches. (Since the surface adjustment of InDesign® CC 2017.1 separators in menus unfortunately are nearly unvisible.)

When logging in or setting a data folder (which may also be at the start of InDesign®) automatically all available search methods are loaded. When a search method is choosen, the names of the four search boxes and their contents can are changed according to the defintion of the search method. If the predefined search value consists of several lines, the text field is automatically converted into an editable drop-down menu. The search popup itself will get the configured help text as tool tip.

Besides the standard search, you can access pre-configured and custom searches. All available search methods are shown in the search popup panel. If pre-configured or custom search methods are selected, the search will begin immediately. It first reads the information of the search fields and then performs the search statement.

The search statement is only used for the top level entries. To load the sublevel entries the panel statements of the products are used as usual.

For very complex queries, the Product Pool can also be loaded using cScript.

Attention : Loading with the help of cScript is only supported in FindStatements!

The following steps are necessary for this:

  1. Creating a FindStatement. Instead of a select,, set the statement to #actionID. with actionID set to the action used to load the products. In the SQL case, for example, #2000. In XML-Offline and possibly SOAP/ubServer the path of a XML file of the data pool must be placed before this definition. This file is ignored by the script execution, but is necessary for a syntactically correct xmlquery call. Use an existing and as small as possible XML file of your data pool here, e.g. "colors.xml" #2000.
  2. Create the action referenced in the Findstatement.
  3. Implementation of the action. The following global variables are defined in the script:

    char         gDocumentID[];
    ProductList  gProducts;

    The task of the script is to fill the list gProducts. The products of the list must be created with product::alloc (kListOwner) and must define at least the attributes kID, kRow1, kRow2 and if possible kPageitemId. You can access the search field inputs directly with the <searchvalue1>, ..., <searchvalue4> tags. These tags are automatically replaced in the script text before the script execution. But please note that the search values usually have a % at the end!

Here is a sample script for loading the Product Pool.

#include "internal/types.h"
#include "internal/products.h"

int main ()
{
    Product p;
    int    i;
    String row1 = string::alloc ();
    String row2 = string::alloc ();
    String sv = string::alloc ();

    for (i = 1; i < 10; i++)
    {
        string::set (sv, "<Unquoted_searchvalue1>");
        string::erase (sv, string::length (sv)-1); // remove the % at the end
        string::set (row1, "Product %d", i);
        string::set (row2, "%s %d", sv, i); // or whatever you want

        p = product::alloc (kListOwner);
        product::set (p, kID, i);
        product::set (p, kRow1, row1);
        product::set (p, kRow2, row2);
        product::set (p, kPageitemid, 5);

        productlist::append (gProducts, p);
    }

    return 0;
}

To save your own searches, use the fly-out menus of the panel:

Saving a search requires the installation of the table/file findstatements with the attributes label1, label2, ... ..

In PubServer connections and generally in search methods without search fields, no own search methods are created.

To delete your own searches, use the fly-out menus of the panel:

Pre-configured search methods are part of the current data set. They are created once and can be used (but not changed or deleted) by all users.

As a system configurator you can set the parameter candelete of the search entry to 0.

For the configuration of search methods the tablefindstatements (with XML and SOAP the file findstatements.xml) is needed. For classical applications (< 1.3.3 P/R 47) the search methods can be supported by the table conditions (or the file conditions.xml).

Even when the classical search method is not used, the table conditions (or the file conditions.xml) must exist. Of course the table can be empty then.

All search methods are managed in the table/file findstatements. The search methods access the current search criteria via the tags <searchvalue1> (left top) to <searchvalue4> (right bottom). The tags are replaced by the respective current values in the panel. The following applies:

  1. Integers remain unchanged
  2. Floating point numbers remain unchanged
    • Without any further name affix (e.g. <searchvalue2>) :
      • Add a % to the end
      • Double all single quotation marks (')
      • Enclose the text in single quotas (')
    • With the prefix Unquoted_ (e.g.. <Unquoted_searchvalue2>) no outer quotas are inserted
      • Add a % to the end
      • Double all single quotation marks (')
    • With the prefix Content_ (z.B. <Content_searchvalue2>) the text remains unchanged except of the %
      • Add a % to the end
    • With the postfix _nopercent (z.B. <Content_searchvalue2_nopercent>) the % is skipped :
      • The % sign at the end is not added

The following table explains the fields of findstatements and their use:

Name Type Description
id int Unique ID of the data record
classid int The panel the search method is used in. Currently only the product pool (ClassID 3) is implemented.
userid int (only database) User ID. Only users with this UserID can see this entry.

0 : All users see this entry

description char* Description of the search method. The text is shown as (yellow) help text in the popup.
label char* Name of the search method to be displayed in the search popup. Dividing lines in the menu are created with "-".
sequencenr int Order of the menu entries.
source char* only XML and SOAP Experimentally (not used currently)
statement char* Search statement. For linking with the current search criteria the stament can contain these cues:
Saving of search results and simplified search. If the entries are missing no user methods can be saved and the search must be configured with the classical method.
candelete int 0 : Pre-configured search methods
1 : Costum search methods
label1 char* Labeling of the search fields
  1. top left
  2. lower left
  3. top right
  4. lower right

The labels are translated according to the standard procedures. Search fields with the following labels are automatically deactivated:

  • Unused
  • unused
  • -
  • Empty string

If all search fields are deactivated, the search fields are automatically hidden and the height of the product list is adjusted accordingly.

label2
label3
label4
value1 char* Values of the search fields. Text entries are automatically appended with "%" during the search.
  1. top left
  2. lower left
  3. top right
  4. lower right

Since v4.1.7 R27303 : If the content consists of several lines, an editable drop down menu with the corresponding entries is automatically created from which the search criteria can be selected. It is still valid:

  • The entry Any Value is added automatically
  • Whitespace around the lines are removed
  • ! at the beginning of the text selects the entry in the menu
  • - A single minus (-) creates a delimiter line
  • Submenus cannot be defined

Since v4.1.7 R27311 : The specification ##ID (e.g. ##12345) executes the script with the Action-ID ID. This script determines the content of the search field. The action must be defined with ClassID 61! The following global variables are defined in the script:

int gStatementID;   // ID of findstatements or 0 in case of standard search
int gFieldNum;      // Field number (1-4, see above)
String gValues;     // result string

The result gValues may contain line separators. Then a search dropdown is formed from the individual lines (see above). An exclamation mark (!) at the beginning of the line marks the default selection of the drop down.

Here is an example:

Create a drop down with the entries Searchvalue 1, Searchvalue 4, Searchvalue 9, ... and the current datetime. Searchvalue 9 should be pre-selected.

#include "internal/types.h"

int main ()
{
    int i;
    String dt = string::alloc ();

    for (i = 1; i < 6; i++)
    {
        if (i == 3) string::append (gValues, "!");
        string::append (gValues, "Scriptvalue %d\n", i*i);
    }
    string::append (gValues, "-\n");
    string::append (gValues, "%s", system::now (dt, ddmmyyyy_hhmmss));

    return 0;
}

value2
value3
value4
sourcefiles

alias
path

char* only XML and SOAP In the plug in Settings you can set up alias names for files and folder that can be used during evaluaion of XML statements. In order to make it unnecessary for users to make these settings before searching, you can also make them in the findstatement. For details, see next chapter..

Only XML and SOAP Many search statements of an XML installation use alias names instead of fixed file names to refer to source files. The current mapping between alias names and paths are set up with the plug in Settings. In order to make it unnecessary for users to make these settings in this panel, you can also make them in the file findstatement.xml.

All aliases defined in a search method are automatically also set in the panel Settings gemacht. When the search method is changed the old mapping is restored. If the search method contains a mapping that does not yet exist it is created.

Mappings are defined like in this example:

For a search method the alias names $XMLDATA and $IMAGES are needed.

<sourcefiles>
    <sourcefile>
        <alias>XMLDATA</alias>
        <path>Kommunen.xml</path>
    </sourcefile>
    <sourcefile>
        <alias>IMAGES</alias>
        <path>$DESKTOP/Bilder</path>
    </sourcefile>
</sourcefiles>

The classical method ensures that search methods are configurable on all panels. This is most often unneeded. But the classical method is also the only way to rename the search fields of the standard search.

To label the search fields and their current values the classical method needs the table conditions.

Name Type Description
id int Unique ID of the data record
label char*

Label of the search field

The labels are translated according to the standard procedures. Search fields with the following labels are automatically deactivated:

  • Unused
  • unused
  • -
  • Leerstring
sequencenr int Which search field is meant?
  1. top left
  2. lower left
  3. top right
  4. lower left
typeid int Type of the search value. Strings are quoted automatically:
  1. int
  2. float
  3. string
value char* This text is inserted into the search field designated by sequencenr.
replacebyvalue char* unused
conditionmenueid int 0

The binding between search statement and the current search criteria is done with the keywords

     %!conditionID, with ID a valid id from conditions

and is made in the following way:

  1. When the processing finds the hint %!condition28, the condition with the id 28 is read.
  2. Of this condition the field sequencenr is read.
  3. This number (by definition a values between 1 and 4) designates the search field to be used.
  4. Now the current search value can be fetched.
  5. The current search values replaces the string %!condition28 in the search statement. The search value is also quoted with single quotes if condition 28 has the typeid 3.

The key word %!condition may not be used in comments!

Now remains to be resolved how the conditions can realize a search. So far, the search criteria were not yet changed:

When a new search method is selected all %!conditionID of the search statement are evaluated like in the real search. But in contrast to the search, here beside the sequencenr also the fields label and value are evaluated and used for labeling and content of the search fields.

If you want to change a search field that is not used in the search, but maybe only in sublevel entries, you can use the keyword

     %!CONDITIONID

It is evaluated in the same way as %!conditionID.

This keyword may only be used in comments, it is not evaluated by the search.

The %!CONDITIONs are used after the evaluation of the %!conditions and can overwrite their changes.

/* %!CONDITION29 is used on level 3 */

Change the labeling of the third search field of the standard search. To that end first a condition is defined. Then in panel statement 55 a comment line is inserted.

/* 1. Define the condition 29 */
<condition>
   <id>29</id>
   <conditionmenueid>0</conditionmenueid>
   <label>Elemente</label>
   <sequencenr>3</sequencenr>
   <typeid>3</typeid>
   <value></value>
   <replacebyvalue></replacebyvalue>
</condition>
/* 2. Insert a comment into panel statement 55 */

/* %!CONDITION29 is used on level 3 */

Definition of a pre-configured search method which can used as an example for custom search methods.

<findstatement>
   <id>3</id>
   <label>Printprodukte</label>
   <description>anything</description>
   <classid>3</classid>
   <userid>0</userid>
   <source></source>
   <statement>
      "$XMLDATA"
      select
          ID, 0, 3,
          3,
          2012,
          DescShort#__igNOre__, "",
          0,
          20000,
          0,
          "", "", "",
          0, 0, 0
      node Publication.ProductGroup
      where     1 &gt; 0
         and Nummer like &lt;searchvalue1&gt;
         and DescShort#__igNOre__ like &lt;searchvalue2&gt;
      orderby DescShort#__igNOre__
   </statement>
   <sequencenr>30</sequencenr>
   <label1>Nr.</label1>
   <label2>Name</label2>
   <label3>Elemente1</label3>
   <label4>-</label4>
   <value1>Print</value1>
   <value2></value2>
   <value3>F</value3>
   <value4></value4>
   <candelete>0</candelete>
</findstatement>

Platzhalter von Texten und Rahmen können durch Shift-Klick in die erste Spalte der Produktliste mit dem jeweiligen Produkt verknüpft werden. Dabei werden die Platzhalter aller ausgewählten Rahmen und/oder Texte mit dem Produkt verknüpft. Ist das sog. Autoload-Button der Palette aktiviert (rot)

    

werden nach dem Verknüpfen alle Platzhalter sofort geladen.

You can load multiple Comet Groups at together :

  1. Select the desired Comet Croups in the document, one frame per Comet group is sufficient.
  2. Select at least the same number of products in the panel. Products with the status 'Can be deleted' (displayed in slanted font). will not be counted.
  3. Shift-Cmd-Klick the first row of the first selected product.
  4. The first Comet Group is now loaded with the first product, the second with the second product and so on. The order of the Comet Groups is determined by the page elements. If the current target page is not provided with a pagetemplate, the Comet Groups will be "sorted line by line" according to their XY coordinates.

Here is a short film to demonstrate :

Template changes can be made directly from the product search:

  1. Select the desired Comet groups in the document, one frame per Comet group is sufficient.
  2. Set the desired templates to the products by using the template pop-up menu in the upper left corner of the panel.
  3. Shift-Alt-Click changes the templates of all selected Comet Groups. Contents of friendly frames are taken over.

The above movie also contains a template change at the end.

Tip : Since the placeholders are not linked to new Product IDs, it is sufficient here to select any products in the panel. Only the set template is used for the template change in each case.

In the page creation dialogue you can specify if you want to use the sublevel objects of the current selection instead of the current selection.

If the option "use only deepest level" is disabled, the product structure is searched only up to the maximum specified depth. If a product is found with a defined template this product is used for the import and the structure is not searched further. If the option is enabled the search continues up to the specified level even if the parent object has a defined template.

The next examples show which products are imported with which settings. In the images the products that are imported have a green background. In every case the option "Skip products without templates" must be enabled.

onload="this.width*=0.5"

For the creation with page templates the list of products to be created can also be made by a script. These scripts must have the ClassID 37. They get the list to be filled as a global variable (gProducts). The next table shows all global variables the scripts can use.

Name Type Description
gProducts ProductsList This list is filled with the products that are to be created.

It is important to create products, that are inserted into this list, with the flag kGlobalStack.

gPageTemplate int* You can also define the page template in this script. At the start of the script the variable has the value defined in the creation dialogue.

Attention, this is a pointer, so make assingment like this:

    *gPageTemplate = 12;

gErMess char [1024] If the script should generate an error you can fill this string. In case of errors the return value of the script must be unequal 0.

A simple select script.

#include "internal/types.h"
#include "internal/products.h"

int append_product (ProductList pp, int id1, int id2, int id3, char * ids)
{
    Product p;

    p = product::alloc (kGlobalStack);
    product::set (p, kID, id1);
    product::set (p, kID2, id2);
    product::set (p, kID3, id3);
    product::set (p, kStringID, ids);

    productlist::append (pp, p);
}

int main ()
{
    append_product (gProducts, 100, 0, 0, "");
    append_product (gProducts, 300, 0, 0, "");
    append_product (gProducts, 400, 0, 0, "");
    append_product (gProducts, 600, 0, 0, "");

    // *gPageTemplate = 12;
    // strcpy (gErMess, "That was your error!");

    return 0;
}

In the panels Product pool and Products of the document there is a button to reorganise des document or parts of the document:

    

The cleanup always starts with the Cometgroup of the first select document frame. In the next table you can see how you can control the reorganisation with which key:

Product pool Products of the document
Alt click

Clean up only the current page.

Products that don't fit on the current page are stacked (messy) on the next page at a distance of 1x1 points. When cleaning up the next page these products keep their order.

Shift click

Independent of the document selection the whole document is cleaned up.

If the alt key is pressed at the same time, the key is without effect.

Control click

The contents of friendly frames are also loaded anew.

Attention: The control key must only be pressed before releasing the button!

Used page templates
Without Cmd key

The page templates set in the document are not changed

For new document pages the page template is used that is defined as the successor of the page template of the last document page.

Every page template entry of the list leads to a page change with the requested page template. Thereafter the successor settings of the page templates are used.

If the first selected list entry is no page template, the page template set in the document is used as the start template.

With Cmd key

The page template of the first page to be cleaned up is kept. The page templates of all following pages are used according to the successor rules of the page templates.

The page templates defined in the document are not changed. The page template entries of the list are ignored.

For new document pages the page template is used that is defined as the successor of the page template of the last document page.

For the installation of the tables and data records needed for the product pool please open the installation folder und execute all sql files in an sql program in order:

@ 'Daten/Products/products.sql'

Since v4.1.5 R23000 After the last finish of your documents you may probaly wish to update prices and some other things agai, but your agency has no access to your data system. In this case, the required data can be recorded in advance. The agency then only needs the folder with the recorded placeholder content.

To set the update folder, please use the menu

    Behavior when loading placeholders ->Set update folder

To activate recording, choose menu

    Behavior when loading placeholders -> Load and export to update folder

To use recorded date, please choose menu:

    Behavior when loading placeholders ->Import from update folder

Using the cScript funcrions prefs::set_updatetype, ... you can also script this steps.

Actualization merely replaces content. Loading actions that make further document changes or replace content only partially or incrementally can not be supported.

The data folder does not need to contain data for each placeholder of the document. However, if it contains data for a placeholder, data must be available for all products that are to be updated.

The panel shows the products built up in the current document.

The list of products shown in the panel can be changed manually. Use to reorganized the document according to the current list. The reorganization starts with the page of the first selected entry of the list. If this page contains a continuation template, it goes back to the first Comet Group of the continuation. If no list entry is selected, the reorganization starts at the beginning of the document.

Frames and Comet groups added manually to the document are automatically deleted by the reorganisation.

The list can be edited with the following actions:

Action Button(s) Description

Reload the list

Attention : Manual changes to the list will be lost when reloading!

Exclude layers from the reorganisation

In the Layout Layers pop-up, any number of layers of the document can be excluded from the reorganization. The setting is valid until the next change of page template.

Change order

 

Buttons and on the side right under the list

Delete elements

Button ath the bottom left of the panel

Add page breaks

Drag and drop from the panel Page Templates. Please note that each page template means a page change.

Add products

Drag and drop the products from the Product Pool

Change product template / page template

Pop-up Template/Page Template below the list. The content of the pop-up menu depends on the type of list entries selected.

Change page breaks

Clicking the page symbol at the beginning of the page templates lines changes the page type of the page break from Any to Right page to Left page back to Any. Missing empty pages are automatically inserted by the reorganization.

Take over manually added frames and Comet groups

If the eye button on the left of the list is red, manually created frames and comet groups are included in the document structure.

Save list

With the button the current list can be saved as an XML file. A list saved in this way can be reloaded into the palette using drag and drop. This is particularly helpful for tests.

With activated synchronisation of the selection the frames of the product are selected in the document. This makes it possible to select frames of several spreads, which is not possible with InDesign® on-board tools - a good opportunity if frames are to be (re)edited uniformly in some way. We have built in two standards scripts here:

Any number of further actions can be defined as actions of ClassID 39. The following global variables are defined in the scripts:

Name Typ Beschreibung
gDocument ItemRef Current front document
gParam1-4 char*

char*-Strings of parameters 1-4

gParamInt1-4 int

int-Values of parameters 1-4 or 0 if the value is not a number string

gParamFloat1-4 float

float values of parameters 1-4 or 0.0 if the value is not a decimal number

You can enter any text (but not too long) in the inputdocumentation of the action. This text is displayed as help text for the action in the panel. outputdocumentation describes the four parameters of the action in a ##-separated list. Single-line texts generate a single-line text input field for the parameter. Line separators within a token automatically create a pop-up menu for the corresponding parameter with the line texts as content. A ! at the beginning sets the default entry. With - you create a menu separator.