Skip to main content

What this is

Use a simple template to automatically build your Train IDs.⁠​​‌‌​‌​‌‌​‌‌​​​​‌​​‌​‌‌‌⁠ Type your pattern and put any “fill-in” parts inside double braces like {{ THIS }}. When the job runs, we replace those parts with real values from the job and date/time.

How to write a template

  • Write placeholders like {{ JOB_NAME }} or {{ YYYY }}.
  • If we can’t find a value for a placeholder, we leave it as-is (you’ll see {{ UNKNOWN }} in the result).

Common variables

Date and time (based on the job’s scheduled date/time): From the job:

Train sequence

Every train created from a job takes the next number in that job’s sequence: 1, 2, 3, and so on. Put {{ SEQ }} in the template to show the number in the Train ID. Numbers have no leading zeros. All of a job’s blueprints share one sequence. For example, with the template C{{ SEQ }}{{ BLUEPRINT_NAME }} and blueprints named G and T, trains are named C1G, C2T, C3G, and so on.
  • A train takes a number even when you type its Train ID yourself, or when the template doesn’t show the number.
  • A cancelled train keeps its number. The number isn’t used again unless you set the next number back to it.
Set up the sequence in the job’s settings, under Train Sequence. A job whose template uses {{ SEQ }} always shows it. To show it for every job, an administrator can turn on Carrier settings → Rail → Show train sequence; it is off by default. The setting only shows or hides the card: trains are numbered either way. On the Train Sequence card:
  • Next number: the number the next train created from the job will take. To change it, click the pencil next to it, type the new number and save. Before the number is set, you see whether any current trains already use that number or a higher one, since those numbers will be used again.
  • Reset: when the count starts again at 1, at midnight in your railroad’s time zone. Click Edit schedule to reset every year or every month, on the first day, the last day or a specific day. For a monthly reset, a specific day can be the 1st to the 28th; for the end of the month, choose the last day. Click Remove schedule to reset only when you change the next number yourself.

Custom train attributes

You can reference your own train attributes (and other job fields) by name.⁠​​‌‌​‌​‌‌​‌‌​​​​‌​​‌​‌‌‌⁠ Just put the name in braces, for example {{ DepartureTime }} or {{ departure_time }}.
  • If the attribute is a dropdown/choice, we insert the selected option’s text.
  • For everything else, we insert the attribute’s value as text.

Copy‑paste examples

  • Make a daily ID with the job name and hour:
    • Template: Train-{{ JOB_NAME }}-{{ YYYY }}{{ MM }}{{ DD }}-{{ HH }}
    • Example result: Train-DayShift-20250907-05
  • Number trains by job and blueprint:
    • Template: C{{ SEQ }}{{ BLUEPRINT_NAME }}
    • Example result: C862G
  • Use month name plus your own field:
    • Template: {{ MMM }} {{ YYYY }} - Line {{ line }}
    • Example result: Sep 2025 - Line S1

Troubleshooting

  • A placeholder didn’t change? Check the spelling. Different styles like JobName, job_name, or job name are okay, but the words must match the field’s name.
  • Not using a blueprint? {{ BLUEPRINT_NAME }} won’t be filled.