Panelstatements are statements that are stored in the data source and are called for certain situations.
The following table gives an overview of the reserved entries of the file/table panelstatements(.xml).
Application | ID | Description |
Product research | 55 | Search for product search entries |
Placeholder colors | 11 | Load the colors used for placeholders. |
Allow-Login Action | 139 |
The script is executed immediately after the successful login and can be used to reject or accept a connection according to your own criteria. If a connection is rejected, it is automatically disconnected again and the login dialog opens again. Return valuesWith return 0 (no error) the connection is accepted. Otherwise the connection will be rejected.WARNING
The following global variables are defined in the script: int gLogins; // Number of successful logins after InDesign® start Here is an example of an ODBC connection: int main () { int ret = 0; char m [1200]; char serv [255]; char name [255]; char usr [255]; sprintf (m, "Really login?\nSRV:%s\nDB:%s\nUSR\:%s", sql::server (gDBC, serv), sql::dbname (gDBC, name), sql::user (gDBC, usr)); if (alert ("OK", "Don't login", 0, 1, 4, m) != 1) ret = 1; return ret; } |
After-Login Action | 92 | After successful data connection After login or setting a new XML folder login actions can be executed.
The following statement types are permitted :
The SQL statements may contain the usual <placeholder> for environment values. The script defines the global variable gLogins, which counts (separately) how many SOAP/ODBC logins were performed and how often the XML folder was changed. (The variable gLogins is used in particular to suppress welcome messages at program startup (gLogins == 1), so it is only needed in the XML login actions.) |
Double click in the product pool | 95 | Load the ID of the script that should run on Doubleclick on a product. |
URLLink download folder | 141 |
Customizing the download folder for URL images, see here. |
Here an example for a login script. The script can be used for XML data folders. The welcome message is automatically suppressed when the program starts.
int main { if (gLogins > 1) { showmessage ( "%d. Welcome to the test environment", gLogins); } return 0; }