Mingcedar

Product: Mingcedar Studio DESIGNER

Table headers, rows, and dynamic data | Mingcedar Studio

Templates preserve reusable components and behaviors. Instance parameters replace equipment names, text, or other settings. Built-in templates include Input, Keypad, Table, Alarm, charts, and video. Configure instances in Template Edit and apply category-based changes with Batch Replace.

Published Updated

<section id="table-template" class="docs-block docs-block-intro docs-block-current"> <span class="section-kicker">Feature</span> <h2>Table headers, rows, and dynamic data</h2> <p>Templates preserve reusable components and behaviors. Instance parameters replace equipment names, text, or other settings. Built-in templates include Input, Keypad, Table, Alarm, charts, and video. Configure instances in Template Edit and apply category-based changes with Batch Replace.</p> <div class="docs-detail-list"> <article id="table-template-item-1" class="docs-detail-row"> <strong>What it is and what it solves</strong> <p>Templates save object groups, behaviors, parameter definitions and instance values. Use placeholders for instance differences, then insert per device. Built-in templates provide dedicated fields. Template Library manages templates, Template Edit configures instances, and Batch Replace applies bulk changes.</p> </article><article id="table-template-item-2" class="docs-detail-row"> <strong>How to use it: save, insert, and the editor fields</strong> <p>Group and select the components, then save to Template Library. Double-click or drag a library card to insert an instance. Import / Export exchanges templates; Delete removes them.

Template Edit fields vary by type:</p> <ul> <li>All instances: Position and Size with X / Y / Width / Height (the top also shows read-only Instance / Template / Group)</li><li>Plain template instance: a Template Variables section lists one input per detected &lt;variable&gt; (e.g. PLC, DB, RUN_TAG); filling it applies to the whole group</li><li>input template: Input Mode (Plain Input keeps only the typed value and does not write / Runtime Variable binds a runtime variable / PLC Tag binds a PLC tag), Variable or PLC Tag (switches with the mode), Write Trigger (defaults to Immediate), Font Size</li><li>keypad template: Target Input (pick the input template on this page to drive; digit keys append a character, Back deletes one, Clear empties, OK writes through the target input)</li><li>table template: Table Name, Table Text ID, Headers, Header Text IDs, Rows (Rows accepts an array, a variable name, or a function name)</li> </ul> <pre class="docs-code-block"><code>// Use template variables in expressions (segmented / whole)

ReadTagBoolean(&#39;&lt;PLC&gt;.&lt;DB&gt;.RUN&#39;, false)

ReadTagBoolean(&#39;&lt;RUN_TAG&gt;&#39;, false)

// Instance: PLC=PLC_LINE01, DB=DB_PUMP01 -&gt; at runtime equals PLC_LINE01.DB_PUMP01.RUN</code></pre> </article><article id="table-template-item-3" class="docs-detail-row"> <strong>Fill the common Template Edit areas in order</strong> <p>Select the instance root and open Templates → Edit Instance. Check Instance, Template and Group; fill Position and Size and Template variables, then continue to the type-specific section. Variables affect this instance only.</p> <ul> <li>Instance: confirm the selected instance name.</li><li>Template: confirm the source template.</li><li>Group: confirm its library category.</li><li>X / Y: top-left position.</li><li>Width / Height: overall instance size.</li><li>Template variables: values for this instance only.</li><li>If ValidationMessage appears, correct that field before Save.</li> </ul> </article><article id="table-template-item-4" class="docs-detail-row"> <strong>Configure an Input template</strong> <p>Choose Input mode before entering a target. Plain Input stores local input only; Runtime Variable writes a page runtime variable; PLC Tag targets a device tag. Choose Immediate when confirmation should submit through the current binding, or External when another button or script will commit it. Finish with Font size.</p> <ul> <li>Plain Input: no variable or PLC tag target.</li><li>Runtime Variable: enter a fixed name such as speedSetpointDraft, or =selectedVariableName for an expression returning a variable-name string.</li><li>PLC Tag: enter PLC_LINE01.PUMP01.SPEED_SETPOINT or &lt;PLC&gt;.PUMP01.SPEED_SETPOINT as a fixed name. Use =selectedSetpointTag for a dynamic target.</li><li>Immediate: submit through the active binding after confirmation.</li><li>External: Enter and leaving the input do not submit automatically. Keypad OK still submits the target Input and does not run a custom Click Script validator.</li><li>Test display and submission, then press Esc in Input to discard a draft. Input has no data-type or numeric minimum/maximum controls; enforce business limits in the submission script.</li> </ul> </article><article id="table-template-item-5" class="docs-detail-row"> <strong>Connect a Keypad template to its target input</strong> <p>The current page must already contain an Input template. Select the Keypad instance, open Template Edit, and set Target input to that input-instance name. Save and test 0–9, Back, Clear, and OK. The current Keypad has no Cancel key; press Esc in Input to discard a draft. If the editor says no input templates were found, insert and save an Input template first.</p> <ul> <li>Configure Input before Keypad.</li><li>Target input must exist on the current page.</li><li>After renaming an input instance, recheck the Keypad target.</li><li>For PLC Tag mode, test permission, confirmation, and write results. If a Submit button must validate the numeric range, do not connect Keypad to that PLC Tag input. Use Plain Input for the draft and validate/write from the button instead.</li> </ul> </article><article id="table-template-item-6" class="docs-detail-row"> <strong>Configure a Table template</strong> <p>Table name is the displayed table title; Table text ID is its translation key. Scripts and ExportTable locate the component by its Name in Behavior Browser or its shapeId. Set Font size and column widths, then fill Headers, Header text IDs, and Rows. If any column width is set, all configured columns must total 100 percent; leave every width blank for equal columns.</p> <ul> <li>Table name: the displayed title, not the component lookup name.</li><li>Table text ID: the title translation key; a matching translation replaces Table name, and a missing translation keeps the title text.</li><li>Column layout: percentages totaling 100 percent.</li><li>Headers: visible header text.</li><li>Header text IDs: language keys or text identifiers matching the headers.</li><li>Rows: an array, page-script variable name, or function returning an array.</li><li>Test zero, one, and multiple rows after saving.</li><li>Table renders read-only text. It has no built-in filtering, pagination, cell inputs, button columns, or per-row state colors. Filter or page the array in your script; use separate Input / button objects or a custom page for editing and row actions.</li> </ul> </article><article id="table-template-item-7" class="docs-detail-row"> <strong>Configure Alarm template filters</strong> <p>Use the Alarm section to limit the alarm template&#39;s display range. Select the display options you need, then enter Tags, PLC codes, Function groups, Device groups, or Signal groups. Separate multiple values with commas or lines and use codes rather than display names.</p> <ul> <li>Tags: device-code.tag-code.</li><li>PLC codes: device-code only.</li><li>Function groups: device-code.group-code.</li><li>Device groups: device-code.group-code.</li><li>Signal groups: device-code.group-code.</li><li>After export, use a known alarm in Mingcedar to verify the filter scope.</li> </ul> </article><article id="table-template-item-8" class="docs-detail-row"> <strong>Template variables, runtime variables, and page parameters are different</strong> <p>These four value types differ in scope and lifetime:</p> <ul> <li>Template variables such as &lt;PLC&gt;, &lt;DB&gt;, and &lt;RUN_TAG&gt;: instance-level substitutions that must be resolved before export; they are not runtime page parameters.</li><li>Plain Input: stores only the current input-template value and is read with template.getValue(&quot;input template instance name&quot;); it does not cross pages automatically.</li><li>Runtime Variable: belongs to the current runtime page and is intended for same-page linkage, not cross-page messaging.</li><li>PLC Tag: belongs to the host data layer. Multiple pages may read the same Tag, but that is data binding rather than page-parameter passing.</li><li>Page parameters: sent by Open Link, openPage, or Open Page as Popup and read on the destination with GetPageParameter*.</li> </ul> </article><article id="table-template-item-9" class="docs-detail-row"> <strong>When to use it</strong> <p>Repeated equipment: save a pump or valve template, then fill each instance’s PLC, DB and other parameters to replace matching targets.

Input area: connect a Keypad to a Runtime Variable or PLC Tag Input through Target Input. Read its value with template.getValue(&quot;Input component name&quot;).

Batch Replace: verify Scope and Variables, enter Find / Replace with, and review Type / Object / Replace in / Current value / Replacement preview before clicking Replace.</p> </article><article id="table-template-item-10" class="docs-detail-row"> <strong>Limitations and troubleshooting</strong> <p>Check these settings:</p> <ul> <li>Variable names must be wrapped in angle brackets. Letters, digits, underscore, and non-ASCII letters are supported, but hyphens, dots, and spaces cannot appear inside the name. Shared templates should prefer ASCII uppercase names such as &lt;PLC&gt; and &lt;RUN_TAG&gt;; write tag paths as &lt;PLC&gt;.&lt;RUN_TAG&gt;.</li><li>Template variables are instance-level and live only on the instance root group: copying the whole group carries them along and all child shapes share one set of values; don&#39;t try to set them per child shape</li><li>Variables may be left blank while editing/inserting, but export validates them: if any unreplaced &lt;variable&gt; remains, export fails, so fill them all before exporting</li><li>Template Edit only works on a template instance root group: with a plain shape or plain group selected the button is unavailable; picking the wrong object means the editor won&#39;t open or shows no variable rows</li><li>keypad needs an input template first: if this page has no input template yet, Target Input prompts you to insert one and come back</li><li>Batch Replace covers the selected categories of text, tags, links, scripts, behavior settings, and colors. It does not change the template structure; fix the template source if each replacement still needs layout changes.</li> </ul> </article> </div> <div class="docs-note-grid"> <figure id="table-template-image-1" class="docs-note-card manual-doc-image-card"> <img src="/WEB_img/HQPPT/current/templates/edit-instance-variables.png" alt="Current Mingcedar Studio template-instance editor" loading="lazy" decoding="async"> <figcaption> <strong>Template Edit</strong> <p>Template Edit: verify the instance source and geometry, then fill variables for this instance.</p> </figcaption> </figure> </div> </section>