Skip to main content

Choose Variables, Recipes, Queries, RecordStore, or i18n

When to use this guide

Use this guide when you need to store state, maintain process parameters, connect to MES, display tabular data, or localize a runtime page, but are unsure which capability fits.

Before you start

Answer four questions:

  1. Does the data come from this app, site equipment, or an external system?
  2. Must it survive an app stop or power loss?
  3. Is it one small value, one complete parameter set, or many rows?
  4. Who changes it: an engineer, a runtime operator, or an external system?

Steps

Step 1: Choose the capability

NeedChooseTypical example
Share one small value while the app runsApp VariableCurrent work order or equipment state
Keep one small value across restartsSaved VariableCalibration, accumulated count, or threshold
Switch a fixed field set by productRecipeTemperature, pressure, and time for one product
Call a service or database outside the appQueryRead an MES order or report production to ERP
Maintain structured rows on the deviceRecordStorePoint table, batch table, or lightweight parameter table
Switch the language of one runtime UIi18nButtons, headings, and alarm messages

Do not put every kind of data into Variables. Send large histories, complex queries, or cross-device shared data to an external system and access it through a Query.

Step 2: Configure it from the correct entry point

Variables

  1. Open Settings → Variables.
  2. Add a variable and set its name, type, default, and required scope.
  3. Save, then read or write it from a Page or Graph.
  4. Verify its first-start value, its value while running, and its value after a restart.

Recipes

  1. Add the single RecipeManager object in Object Tree.
  2. Open Settings → Recipes and define the fields.
  3. Add a recipe for each product and save every field value.
  4. Switch recipes from a test page or flow and confirm that the full field set changes together.

Queries

  1. Open Settings → Queries.
  2. Add a Query and define the external endpoint, operation, inputs, and expected outputs.
  3. Save it. Test failures, timeouts, and unexpected responses before using it in a Page or Graph.
  4. For external writes, complete a traceable end-to-end test in a test environment.

RecordStore

  1. Add a RecordStore object in Object Tree.
  2. Define its fields and storage mode in the Properties panel.
  3. Use its object methods from a Page or Graph to read, add, update, and delete rows.
  4. Test an empty table, normal data, and invalid data.

i18n

  1. Open Settings → I18n, add the required languages, and choose the default language.
  2. Create stable keys for user-visible text and enter a translation for every language.
  3. Use the translation picker in a widget text property to bind the key.
  4. Switch the runtime language and check long text, missing translations, and default-language fallback.

What success looks like

  • Temporary and persistent values behave as expected after stopping or restarting the app.
  • Switching a Recipe updates the whole set without mixing parameters from two products.
  • Normal, failure, and timeout paths for each Query produce an explicit result.
  • RecordStore fields align with the page table, and row operations do not shift data into the wrong columns.
  • After a language switch, the runtime UI has no raw keys, blank labels, or obvious clipping.

Common issues

Should I use a Saved Variable or a Recipe?

Use Saved Variables for a few independent long-lived values. Use a Recipe for a named parameter set that must be switched and applied as a unit.

Should I use RecordStore or Query?

Use RecordStore for lightweight rows owned by one device. Use Query for external databases, large histories, complex retrieval, or data shared by multiple devices.

Recipes says RecipeManager is missing

Add RecipeManager in Object Tree first. An app needs only one instance.

I saved i18n, but the page still shows old text

Confirm that the widget is bound to a translation key rather than fixed text, then check that the active and default languages both contain the key.

How AI can help

Ask AI to classify the data before asking it to create anything:

I need to store product model, temperature, pressure, current work order, and the most recent 50 batch results. First classify each item as Variable, Recipe, Query, or RecordStore by lifecycle and shape. Wait for my confirmation before changing files, then provide acceptance tests.

AI can also draft translations, Query input and output contracts, and test data after you confirm the business fields.

What a person must confirm

  • Which values must survive power loss and how long they may be retained.
  • Recipe units, ranges, defaults, and approval before values are sent to equipment.
  • The real Query endpoint, authentication, write side effects, and failure compensation.
  • Whether the intended data has outgrown RecordStore's lightweight, single-device role.
  • All operator-facing translations, especially alarms, confirmations, and safety-related text.