# Fallback Dataset for empty sets

**URL:** https://community.xibo.org.uk/t/fallback-dataset-for-empty-sets/37206
**Category:** CMS Features and Functionality
**Created:** [March 18, 2026, 12:34pm UTC](https://community.xibo.org.uk/t/fallback-dataset-for-empty-sets/37206 "2026-03-18T12:34:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Daniel.Seeger](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/d/db5fbb/32.png) [@Daniel.Seeger](https://community.xibo.org.uk/u/Daniel.Seeger)
#### Post date: [March 18, 2026, 12:34pm UTC](https://community.xibo.org.uk/t/fallback-dataset-for-empty-sets/37206/1 "2026-03-18T12:34:00Z")

</div>

# CMS Version

Version 4.3.1

# Player Type

Preview show the issue allready

# Player Version

Include the full version, including the revision number.

# Issue

Hi,

I’m using Xibo’s internal database to display visitor names on a screen.  
Each record contains a **Date** (`Datum`) and a **Time range** (`Zeit`, formatted as `HH:MM-HH:MM`).  
The current query works – it shows the visitor’s name when the current date **and** time fall within the range:

```auto
SELECT *
FROM Eingang_Namen
WHERE STR_TO_DATE(`Datum`, '%d.%m.%Y') = CURDATE()
  AND STR_TO_DATE(
        CONCAT(`Datum`, ' ', SUBSTRING_INDEX(`Zeit`, '-', 1)),
        '%d.%m.%Y %H:%i'
      ) <= NOW()
  AND STR_TO_DATE(
        CONCAT(`Datum`, ' ', SUBSTRING_INDEX(`Zeit`, '-', -1)),
        '%d.%m.%Y %H:%i'
      ) >= NOW();

```

**Problem**  
When there is **no visitor scheduled** for the current moment, I would like a _fallback_ record (e.g. “No visitor scheduled”) to be displayed.

I could not find a way to define a fallback directly in a Text‑Dataset (the option exists only for the Calendar widget).

### Work‑around attempts

#### A – Add an extra “empty” row

I added a row with `NULL` values for `Datum` and `Zeit` and tried to combine it with the original query using `UNION ALL`:

```auto
SELECT *
FROM Eingang_Namen
WHERE STR_TO_DATE(`Datum`, '%d.%m.%Y') = CURDATE()
  AND STR_TO_DATE(CONCAT(`Datum`, ' ', SUBSTRING_INDEX(`Zeit`, '-', 1)),
                  '%d.%m.%Y %H:%i') <= NOW()
  AND STR_TO_DATE(CONCAT(`Datum`, ' ', SUBSTRING_INDEX(`Zeit`, '-', -1)),
                  '%d.%m.%Y %H:%i') >= NOW()

UNION ALL

SELECT *
FROM Eingang_Namen
WHERE (`Datum` IS NULL OR `Zeit` IS NULL)
  AND NOT EXISTS (
        SELECT 1
        FROM Eingang_Namen AS t2
        WHERE STR_TO_DATE(t2.`Datum`, '%d.%m.%Y') = CURDATE()
          AND STR_TO_DATE(CONCAT(t2.`Datum`, ' ', SUBSTRING_INDEX(t2.`Zeit`, '-', 1)),
                          '%d.%m.%Y %H:%i') <= NOW()
          AND STR_TO_DATE(CONCAT(t2.`Datum`, ' ', SUBSTRING_INDEX(t2.`Zeit`, '-', -1)),
                          '%d.%m.%Y %H:%i') >= NOW()
      );

```

Xibo considers the query **too complex** and rejects it.

#### B – Duplicate the dataset

I created a second dataset record with the same fallback text and added another Text widget to the layout.  
Unfortunately, Xibo applies the **same SQL filter** to every Text widget linked to that dataset, so changing the filter on one widget changes them all. This makes it impossible to have a dedicated fallback widget.

### What I need

1. A **single, simple query** (or Xibo‑supported method) that:

2. If a query‑only solution is not possible, any **Xibo configuration tip** (e.g. using a second layout, a hidden widget, or a different widget type) that reliably shows the fallback text only when the main query returns no rows.

Any advice, sample queries, or configuration tricks would be greatly appreciated!

---

<div class="post-metadata">

### Author: ![system](https://community.xibo.org.uk/uploads/default/original/2X/a/a8759c2d8cc561474733895ac75beeb830f5d8ca.png) [@system](https://community.xibo.org.uk/u/system)
#### Post date: [June 17, 2026, 6:34pm UTC](https://community.xibo.org.uk/t/fallback-dataset-for-empty-sets/37206/2 "2026-06-17T18:34:55Z")

</div>

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.
