Action types
Click actions are added on the Events tab of an object, for the left, middle and right mouse button (see Click actions). This page lists every action type with its parameters. Actions run on the runtime screen and in a test run; in the design view a click only selects.
How a list of actions runs
- The actions run from top to bottom, each one after the previous has finished.
- When an action fails, the error is written to the browser console and the next action still runs.
- Cancel in a Confirm Dialog skips only the actions under its Then run:; the actions after the dialog run.
- + Add Action adds a Console Log; changing the type resets the parameters.
- Pages have no action lists; page events are scripts.
Signals and commands
| Action | Parameters | What it does |
|---|---|---|
| Write Tag | Tag; Value (a true/false list, a number or a text depending on the signal type); Confirmation dialog (off: the popup itself is the confirmation) (on by default) | Writes the value to the signal |
| Toggle Tag (boolean) | Tag | Writes the opposite of the current value of an on/off signal |
| Signal Detail | Tag (also #p1#) | Opens the signal detail panel next to the clicked object; only when the project setting Signal detail panel allows actions |
| Communication Control | Driver key; Start, Stop or Restart (default Restart) | Starts, stops or restarts a driver after a confirmation (see Communication control) |
| System Stop | None | Stops all drivers, the alarm engine and the history writer after a warning and a second window with a reason and the project code typed by hand (see Stop the system) |
Before Write Tag and Toggle Tag (boolean) send a command, YTCC checks in this order:
- The server connection: without it the command is not sent (Server connection missing — command not sent).
- Sign-in when the project uses authentication (Sign in to send commands).
- A confirmation with the description of the signal, for signals of a field device. Inside a Confirm Dialog this confirmation is not asked again. A Write Tag with Confirmation dialog off does not ask either: use this for the button of a command popup that is the question itself. Everything else on this list still applies.
- On the server: control of the responsibility zone, the reason and second-user approval of critical commands, and the write limits of the signal.
The result is a message such as Command applied, Command applied and confirmed, Command sent (no device confirmation) or Command rejected: with the reason. Every command is written to the command log and the event list (see Send commands).
Communication Control needs the right to control communication and System Stop the right to stop the system; both are written to the event list.
Pages, popups and views
| Action | Parameters | What it does |
|---|---|---|
| Navigate to Page | Page | Opens the page; the version for the window size (tablet, mobile) is chosen when one exists |
| Open popup | Popup; a value for each parameter of the popup (a signal or #p#.part); position: modal default, centre, at the clicked object, at the clicked point or fixed x, y | Opens the popup (see Popups) |
| Close Popup | Close all (off by default) | Closes the top popup, which is the popup of the clicked button; with Close all, all popups |
| Open Trend | Trend profile (a shared profile, chosen from a list); Signals (comma separated) (also #p1#) | Opens the trend screen with up to 8 signals. With a profile, the signals, scales and range come from the profile and the listed signals are added to it (see Trend) |
| Chart Signal Selection | None | Turns the signal selection for chart windows on or off, as in Charts |
| Open Chart Template | The name of a template | Opens all windows of the saved template; upper and lower case do not matter. With an unknown name it shows Chart template not found; with an empty name it does nothing |
| Map View | Map; Saved view ((Initial view) by default) | Moves a map to a saved view; when the map is on the page opened by an earlier action, the move waits up to 10 seconds for it (see Map object) |
Asking and testing
| Action | Parameters | What it does |
|---|---|---|
| Confirm Dialog | Message (default Are you sure?); Then run: a list of actions | Asks the question with Cancel and Yes; Yes runs the list. A Confirm Dialog can contain another one. |
| Console Log | Message (default Clicked!) | Writes the message to the browser console; for testing |
Good to know
- Communication Control and System Stop in a test run act on the running project, as on the runtime screen.
- An action whose parameter is missing is skipped and the next action runs: an empty Tag, a page or popup that does not exist, a map that is not chosen, Toggle Tag (boolean) on a signal that is not on/off or has no value yet.