Skip to main content

Use Different Rules for Different Shifts

Shift types let you use different daily rules within one Smart Formula. For example, you can apply one ordinary rate to Day shifts and another to Night shifts. You define shift types on each formula to determine how timesheet lines get their type. You can supply shift names in your data, set up automatic selection using start-time windows, or use a default for every line. You can also combine these options. UpSheets selects a type in this order:
  1. Supplied shift name: Supply Shift type in your data, or select a type in the upload editor. A supplied name takes priority over the start-time windows and default. Wildcard types are checked first, then exact names. A name that matches neither does not fall back.
  2. Start-time window: If the shift name is blank, UpSheets checks the line’s start time against each type’s optional Start from and Start to window. The first matching type is used.
  3. Default shift type: If no window matches, no windows are set, or the line has no start time, UpSheets uses the type marked Default on the formula.
For example, define Day as the default and give Night a start window of 18:00–06:00. A blank shift name on a line starting at 20:00 selects Night. A blank name on a line starting at 09:00 selects Day. Supplying Day on the 20:00 line overrides the Night window. If your data already supplies reliable shift names, leave the start-time windows blank. If it only supplies start times, use windows to select types automatically. If all lines normally use one type, set that as the default and supply another name only for exceptions. The selected type stays the same across the whole shift, including after midnight.

Enable Shift Types

  1. Select Smart Formulas > Configure.
  2. Open Settings.
  3. Set Enable shift types to Enabled.
This shows shift-type controls in the formula editor, import mapping, upload editor and simulator.

Set Up a Formula

Open an editable Smart Formula draft from Smart Formulas > Configure. In the Shift Types summary, select Edit.
  1. Select Add shift type and enter a name, such as Day or Night.
  2. Optionally enter Start from and Start to.
  3. Drag a row using the grip at the left to change processing order. Order in the table is the order UpSheets uses when matching wildcards and start-time windows.
  4. Use Set default to choose the fallback type. The selected type shows a Default badge.
  5. Select Save.
The Shift Types row shows toggle buttons for each configured type plus Unset, and an Edit or View action to change type names, start-time windows and the default. Published formulas show these settings read-only; create a new draft version to change them.

Filter Rules by Shift Type

On the formula editor, the Shift Types row filters the Rules table. Unset, Day, Night, and any other configured types appear as toggle buttons. All options start selected, so every rule is visible until you change the selection.
  • Unset includes rules with no shift limit in the rule editor (they apply to every shift type).
  • Each shift type includes rules limited to that type. A rule limited to more than one type stays visible when any of those types is selected.
To review rules that matter for one shift, for example Night, together with rules that apply to every shift:
  1. Leave Unset and Night selected.
  2. Deselect every other shift type.
The table then shows apply-to-all rules plus Night rules, and hides rules limited only to other types (for example Day only). To list rules limited to Night only, without apply-to-all rules:
  1. Deselect Unset and every other shift type.
  2. Leave only Night selected.
The filter works together with Search above the Rules table. If nothing matches, the table shows No rules match this filter.

Choose Which Rules Apply

In the formula editor, open a rule or select Add rule. The Shift Types dropdown appears after Priority when shift types are enabled, the formula has types, and the rule supports them.
  • Select one or more types to limit that rule to those shifts.
  • Leave the selection empty to show All and apply the rule to every shift type.
  • Clear the selection to return to All.
The Rules table shows small shift badges after names of rules with a specific selection. Rules set to All have no shift badge. Shift selection is an extra condition. The rule’s days, time or hour range, priority and other conditions still apply. Selecting a shift does not make a rule apply to every hour automatically. Weekly overtime rules and weekly allowances cannot be limited to a shift type.

Optional Start Times

Use shift times when you want UpSheets to choose the shift type automatically, without supplying a shift name on every timesheet line. This is useful when your data has start and end times but no shift names. Start from and Start to define the range of start times that identifies that shift type. For example, give Night a window of 18:00–06:00. A line starting at 20:00 is then treated as Night, so rules limited to Night can apply. A line starting at 09:00 does not match that window and uses another matching type or the default. These fields classify the whole shift by when it starts. They do not set the shift’s duration, restrict its paid hours, or change its type when the clock passes the window boundary. A Night shift starting at 20:00 and ending at 08:00 remains Night for the whole shift, even though it ends after 06:00. Use each rule’s time or hour range to control which hours it pays. Enter both times or leave both blank. A window can cross midnight: Start from 18:00, Start to 06:00 can identify a Night shift that starts in the evening or early morning. If windows overlap, the first matching type in the list is used. That list order is the order shown in Shift Types (drag rows with the grip to change it). Use separate windows to keep selection clear. Both window boundaries are included. If the two times are identical, the window matches any start time. Start times are optional. Leave both blank if you supply shift names in your data or want to use the default. An explicitly supplied shift name takes precedence over the start-time windows.

Wildcard

Turn on Wildcard when the shift type name should match anywhere inside the supplied value. Matching ignores capitalisation. Overnight matches Stayed overnight and OVERNIGHT shift. The line then shows Overnight, the name configured on the formula. * still matches any text when you need a narrower pattern. *overtime* matches overtime, Saturday Overtime, and OVERTIME hours. overtime* matches a value that starts with overtime. Wildcard types are checked first, in the order they appear in the list. That list order is the order shown in Shift Types (drag rows with the grip to change it). The first matching wildcard is used, even when a later type is an exact name. Exact names are checked only after every wildcard fails. A blank shift type does not use wildcard matching. It still uses the start-time window, then the default.

Unmatched values

When a supplied name matches no wildcard and no exact type, Unmatched values chooses what happens:
  • Ignore is the default. UpSheets ignores the supplied name and treats the line as blank, so the start-time window and then the default still apply. No warning is shown.
  • Warn does the same and also shows a warning. You can still upload.
  • Error keeps the supplied name, does not use the window or the default, and blocks the line until you correct the name or add that shift type.

Linked Shifts for Daily Overtime

Use Linked shift when one working day is split across two shifts, such as an evening shift followed by an early morning shift the next day (for example a sleepover). Linking lets the evening’s worked hours count toward the morning’s daily overtime threshold. To set it up, open an editable draft, select Edit on the Shift Types summary, and use the Linked shift column in the table:
  • None is the default. The shift type is not linked.
  • Evening marks the shift type that starts the day.
  • Morning marks the shift type that follows it the next day.
You can mark more than one type as Evening or Morning. Linking is on when at least one type is Evening and at least one is Morning. Set every type back to None to turn it off. If you set only one side, Save shows an error asking for the other.

How a Pair Is Linked

UpSheets links a Morning line to an Evening line for the same employee when:
  • The Evening line is on the previous date.
  • The Morning line starts when the Evening line ends, or later. A morning that starts while the evening is still running is not linked.
  • Both lines are in the same pay period.
  • The Evening line is valid. A line in error is not used.
When more than one Evening line matches, UpSheets uses the one that finished closest to the morning start. Each evening is linked to one morning only. Only worked time counts. Breaks on the evening shift are taken off, and overlapping breaks are counted once. The linked evening hours are treated as already worked when the morning’s daily overtime is worked out, so daily overtime starts earlier in the morning shift. For example, with a daily overtime rule that starts after 10 hours: Together that is 10 ordinary hours and 1 hour of daily overtime. A shift allowance on the formula is paid once for the pair. Linking only changes how the morning’s overtime is worked out. Your formula still needs the daily overtime rule that applies to the morning shift.

Messages on Linked Lines

If the evening line is in error, fix it and revalidate the morning line so the pair can link. If a Morning line is a normal early start with no evening shift, you can ignore the warning.

How a Timesheet Gets Its Shift Type

UpSheets checks each line in this order:
  1. Wildcard: When a shift type is supplied, use the first wildcard whose name appears anywhere in the value, ignoring capitalisation. The line shows that configured name.
  2. Exact name: If no wildcard matches, use the named type configured on the employee’s Smart Formula. Names are matched without regard to capitalisation, so night matches Night.
  3. Unmatched name: When the supplied name matches nothing and Unmatched values is Ignore or Warn, continue as if the shift type were blank. Warn also shows a warning. Error stops here and blocks the line.
  4. Start time matches a window: When the supplied type is blank, or was ignored, use the first matching start-time window.
  5. Default: When no window matches, or the line has no start time, use the formula’s default type.
Error does not fall back to the window or the default. For file imports, map your optional shift-name column to Shift type. You can also select a shift type in the upload editor or simulator. A blank value uses automatic selection as described above.

Simple Examples

Day and Night Rates

Define Day as the default and Night with a start window from 18:00 to 06:00. Add daily ordinary rules for the required days and hours: A line starting at 20:00, with no supplied shift name, selects Night. A line starting at 09:00 falls back to Day. A supplied value of Day overrides the Night start-time window. A daily rule set to All, such as a shared daily overtime rule, remains eligible for both types when its other conditions match. Day and Night hours on the same date share one daily ordinary position for those All rules, so a later Night line continues from earlier Day hours the same way as when only one type is on the date. A daily overtime rule limited to Day or Night counts only that type’s hours on the date. If both types appear on one date, each keeps its own ordinary balance for those type-limited rules. Weekly overtime still uses every hour on the date.

Supplying Shift Names in Your Data

Define Day and Night, leave their start windows blank, and make Day the default. Supply Day or Night as the Shift type in your data. A line containing Night uses Night rules. A blank line uses Day. A line containing an unconfigured name, such as Evening, uses Day when Unmatched values is Ignore or Warn. Warn also shows a warning. Error blocks that line.

Check Your Setup

Use Simulate before publishing and assigning the formula. Check an explicit shift name, a blank value, a start-window match and a shift crossing midnight. Include weekend or public-holiday cases if your formula uses them. If shift controls are missing, check that the organisation setting is enabled, the formula defines types and the rule supports shift selection. You cannot disable shift types while formulas in the organisation still define types. Turning off the organisation setting does not silently remove saved calculation settings. For rates that change at midnight, see Next-Day Rates. This is a separate formula setting and works with or without shift types.