Back to overview

Guide: Generators

Help & Basics Published on 21.01.2026

This documentation describes how to use the integrated generators for Snippets and Button Scripts. These tools allow you to create powerful features and automations without writing PHP code.

1. Snippet Generator

The Snippet Generator is used to create Statistics Widgets for the edit form of a table. These widgets display aggregated data (counts, sums, averages) directly above the form.

Usage

  1. Navigate to Admin > Manage Tables.
  2. Click the Pie Chart Icon (Create Statistics Widgets) for the desired table.
  3. Click "Add Widget".
  4. Select:
    • Label: The title of the widget (e.g., "Open Invoices").
    • Type: The calculation method (Count, Sum, Average, Minimum, Maximum).
    • Field: The data field to calculate (e.g., invoices.amount). Fields from the current table and related tables are available.
    • Icon & Color: For visual customization.
    • Target URL: Optional. Clicking the widget redirects to this page (e.g., a filtered list view). Placeholder {id} is supported.
  5. Click "Create Snippet".

Example

You want to see the total revenue generated by a customer in the customer form.

  • Type: Sum
  • Field: orders.total_amount
  • Link: custom_table_view.php?id=5&filter[customer]={id} (ID 5 = Orders table)

2. Button Script Generator

The Button Script Generator creates PHP scripts that can be attached to Custom Buttons. It covers the most common use cases.

Access

  1. Create or edit a button under Admin > Custom Buttons.
  2. Click the Magic Wand icon (Script Generator) next to the URL field.
  3. Select the desired script type from the tabs.

Script Types

a) Mail Script

Sends an email when the button is clicked.

  • Parameters:
    • Sender: Sender email address.
    • Recipient (Field): The field in the record containing the recipient's address.
    • Subject & Body: The content of the mail. Supports placeholders like {name}, {customer_number}.
  • Example: Sending an "Order Confirmation" or "Welcome Email".

b) New Record

Creates a new record in any table.

  • Parameters:
    • Target Table: Where should the record be created?
    • Field Mapping: Define values for the new record. You can use fixed values, placeholders from the source record (e.g., {id}), or formulas.
    • Action after creation: Open the new record or stay on the current page?
  • Example: Create a new "Task" from a "Contact". The contact ID is written into the task's link field ({id}).

c) Edit Record

Updates values in the current or related records.

  • Parameters:
    • Target Table: Current table or a related table.
    • Fields to update: Field name and new value (or formula).
  • Example: A "Complete" button that sets the status to "Done" and sets the completion date to TODAY().
  • Formulas: Supports functions like DATE_ADD({date}; 14) for follow-ups.

d) Navigation

Redirects the user to another page.

  • Parameters:
    • Target URL: The address (internal or external). Placeholders like {search_term} are automatically URL-encoded.
    • Open in new tab: Optional.
  • Example: A "Google Search" button searching for the company name: https://www.google.com/search?q={company}.

e) Webhook

Sends data to an external service (e.g., Make.com, Zapier).

  • Parameters:
    • Webhook URL: The endpoint address.
    • Method: POST (JSON) or GET.
    • Parameters: Key-value pairs to send.
  • Example: Transfer a lead to a marketing tool or trigger invoice creation in an accounting system.

f) Clipboard

Copies defined text to the user's clipboard.

  • Parameters:
    • Text Template: The text to copy (with placeholders).
  • Example: Copying a formatted address for label printing.

g) Save PDF

Generates a PDF based on a print layout and saves it or offers it for download.

  • Parameters:
    • Print Layout: The layout to use.
    • Target Field (File): The upload field where the PDF should be saved. If left empty, the PDF is downloaded directly.
    • Filename: Pattern for the filename (e.g., Invoice_{nr}).
  • Example: "Finalize Invoice" – Generates the PDF and archives it in the record so it cannot be changed later.

h) AI Script

Uses the integrated AI interface (e.g., OpenAI) to perform intelligent actions based on your data.

  • Parameters:
    • System Prompt: Defines the role and behavior of the AI (e.g., "You are an accounting assistant").
    • User Prompt: The actual task. You can use placeholders to insert data from the current record (e.g., "Analyze the following invoice item: {description}").
    • Target Table & Target Field: Determines where the AI result should be saved (in the current or a related record).
  • Use Cases:
    • Text Analysis: Analyze the sentiment of a customer email and save it in a status field.
    • Data Extraction: Extract important information like date or amount from unstructured text (e.g., email body).
    • Translation: Automatically translate item descriptions into other languages.
    • Suggestions: Generate a suitable title or summary based on project data.

3. Script Cascading (Chaining)

One of the most powerful features is the ability to chain scripts (Chaining). This allows you to build simple workflows.

How it works

In almost every generator, you will find the option "Execute following script on success" at the bottom. Here you can select another existing script.

Process

  1. The user clicks the button (e.g., "Complete Order").
  2. The first script runs (e.g., Edit Record: Set status to "Completed").
  3. Upon success, the system automatically calls the next script (e.g., Save PDF: Generate invoice).
  4. This can in turn call another script (e.g., Mail Script: Send invoice via email).

Important Notes

  • The chain stops if a script reports an error.
  • For "New Record" with the "Open new record" option, the chain is interrupted because the page changes.
  • For intermediate steps, it is best to use buttons with the display context "Hidden / Script only" so they do not appear individually in the interface.