The ToDos panel is used to check and correct your documents. The panel can show the following data:

To update individual tasks, click the respective description with the right mouse button and select the desired solution.

Placeholders and Web Images can be updated automatically. To do this, mark the desired entries in the first column with an eye . With a click of the eye button at the bottom left of the panel, all placeholders and Web Images marked in this way in the list are updated. If no entry is marked with an eye, all placeholders and Web Images of the list are updated.

Comet Notes cannot be updated automatically for obvious reasons. Oversets are not automatically removed, because the necessary adjustment of the frames may cause too large geometry changes to the document. Tasks that cannot be solved automatically have a red description text.

.

You can group placeholders by Comet Groups or by Content. The names of the groups can be determined automatically from the document:

The list of non-synchronous placeholders is searched for placeholders with the following names :

If such a placeholder is found, the current text of this placeholder in the document is used as group name. Of course, this has two disadvantages :

  1. You get a group title only if a corresponding placeholder of the product is also changed
  2. And if you get such a title it is also wrong (or in any case not quite up to date)

To check the placeholders, the placeholder must either have its own sync action or use the default -1.

The default check is set with the -1 action. The load action of the placeholder is executed and its result is compared with the current text content or the current image path of the placeholder. The so-called net string comparison is used for comparison. For the implementation of an own comparison function see here.

For placeholders with direct queries (xmlquery, SQL, SOAP-Query) this takes care of everything - of course, the result of the query is simply used as the current value.

The situation is a bit more difficult when the loading action is a script. In this case it is no longer possible to automatically detect which content the placeholder will have at the end of the script (while not changing the document). Therefore in sync calls of the load script the global variable gNewValue is defined and allocated. (Of course, the variable is also defined in the 'normal' load calls, but there it has the value 0). If gNewValue is not 0 (if (gNewValue != 0)), then it is a sync call. In this case the new content of the placeholder is transferred into this variable. Up to 2 GB of space is available for this. After that, the script must be exited immediately without making any changes to the document. The content of gNewValue is then used as the current value for comparison.

More info about the standard sync can be found here.

[Ab v4.0.5 R20104, 1. Sep 2017] The comparison of the placeholder texts of document and data pool is made on the basis of the so-called net string. Here you will find information on how the net string of a string is calculated. If you want to use a different string comparison, you can implement your own sync action instead of the default sync (Sync-ID -1) and give the placeholder the ID of this action as SyncID. The disadvantage of this solution is that in order to fetch the current text from the data pool, your sync script must first execute exactly the same statements as the load script.

It is simpler to just write the function to compare the strings. Define this action with ClassID 63. The return values of this action correspond to the result of strcmp:

You enter the ID of this action in the placeholder definition:

If the placeholder has Sync ID -1, your function is then used instead of the default comparison when calculating the new state. In the Placeholder Option panel, the string comparison script is displayed in the Text Comparison field when a placeholder text is selected:

The following global variables are defined in the string comparison scripts:

Variable Type Description
gRecordID
gRecordID2
gRecordID2
int

ID of the object to which the placeholder is linked

gRecordStringID
gRecordStringID1
gRecordStringID2
gRecordStringID3
Alle RecordID-Konstanen

char*
gPlaceholderID int

ID of placeholder

gDocumentValue char*

Current text of the placeholder in the document.

The content of this string must not be changed. Changes in the content of the string do not lead to changes in the document - rather to a crash of InDesign®!

gDataPoolValue

char*

Current text of the placeholder from the dart stock

The content of this string must not be changed!

gDocumentID char*

DocumentID

Attention: Changes that are ignored by the sync process in this way will still be overwritten when the placeholders are updated. If you want the changes to remain resistant against updates, please use the = - tool of the placeholders.

Placeholder texts should be aligned by subsequently inserted additional spaces or tabs but the additional characters should be ignored during sync comparisons.

char * prepare_string (char * str)
{
    char * result = alloc (strlen (str)+10);

    get_netweight_str (result, str, 1, 1);
    strreplace (result, "\t", " ");
    strreplace_multis (result, " \t");

    return result;
}

int main ()
{
    return strcmp (
        prepare_string (gDocumentValue),
        prepare_string (gDataPoolValue));
}

In rare situations it may be necessary to implement your own sync script. In these cases you are completely free in the design of the script. Only the new sync state must either be set in the script or returned by the script. Information about this can be found here.

The current document value of placeholders is normally determined from the document. In rare cases, it may be desired to display a text in the panel that differs from this. The variable gOldValue defined in load and sync scripts can be used for this purpose. In any case, check first whether the variable is not equal to 0! You can find an example here.

Special attention is needed for the repeating elements. A description incl. examples can be found here.

[Since v4.1 R10822, 9. Apr 2016] The sync-state of a placeholder in the document can be overwritten manually. In doing so, the current document content (text or image path) of the placeholder is saved in the placeholder together with its current database value. Only when a change is made to the data source or the placeholders content, the placeholder is out of sync again.

To set the status, use the status button (=) of the ToDos panel. With the Shift key held down, the state can be discarded again. With activated checkbox Incl. Loacal Overrides in the ToDos panel you can show all overwritten placeholders. Placeholders with the Overwritten status are marked in the document with a blue =:

The Overwritten state can only be set for placeholders with SyncID -1. Placeholders whose Sync action calculates the current status itself cannot get this state.

Placeholders with the Overwritten State are not reloaded when placeholders are updated. Caution: For security reasons, these placeholders are not loaded even if their content has been changed in the document or dataset. How to reset the state:

For script support, the two script function link::override_sync and link::remove_override_sync are available.

Placeholders in the overset can be determined separately by the ToDos panel. By right-clicking, the overset of the containing frame can be corrected by adjusting the frame or the table row. Automatic oveset solving is intentionally disabled.

Please note that the ToDos panel specifically searches for placeholders in the overset. Oversets without placeholders are ignored by the panel - please use the standard Preflight panel for this.

Starting from v4.2 of the priint:comet plugin, the ToDos panel can accommodate Comet Notes of the "To Do" and "Question" type. It should be clear that the tasks of Comet Notes cannot be done automatically. Therefore, these entries cannot be marked with an eye and are ignored when solving automatic tasks (i.e. updating placeholders and Web Images). To change the state of a Comet Note, right-click the entry. The following options are available:

In all three cases, the note will be marked as Done in the ToDos panel afterwards.

The layer for moving completed notes is set using panel statement 151. The statement must be defined as a script and ensure that the target layer exists. If the panel statement 151 does not exist or provides an empty or non-existent level name, the Done and move to layer 'xxx' menu remains disabled.

Variable Type Data Type Description
gDocumentID in char[]

DocumentID of the current document

gLayername out String

Name of the desired target layer for completed Comet Notes. For notes to be moved to this level, the level must exist.

Attention: The data type is String, not char*!

Here is a simple example of a panel statement 151:

int main ()
{
    string::set (gLayername, "Erledigt");
    layer::add_i (gLayername, -3, 0); // lowest layer
    return 0;
}

Starting from v4.2 of the priint:comet plugin, the ToDos panel can include missing or outdated Web Images. Information about web images can be found here.