Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.omni.co/llms.txt

Use this file to discover all available pages before exploring further.

This example uses a Markdown column to display a numeric rating as a row of stars in a table, with filled (orange) stars for the rating and empty (gray) stars filling the remainder up to five. A table column showing each row's rating as five stars, with filled orange stars for the rating and gray outlined stars for the remainder

Setup

This example uses a numeric rating field and two calculations: one for the filled stars and one for the empty stars. Both calculations use a SWITCH statement on the rating (column A). Add both calculations to your query, then set the column you want to display to Display as Markdown and hide the rating and remaining helper columns. The template references the calculations as {{calc_1.value}} (filled) and {{calc_2.value}} (empty). Calculation reference names depend on the order they’re created, so update them to match your own.
ColNameDescription or formulaPurpose
ARatingNumeric rating field (1–5)Drives both star calculations
BFilled stars (calc_1)=SWITCH(A1, 1, "★", 2, "★★", 3, "★★★", 4, "★★★★", 5, "★★★★★")Orange stars equal to the rating
CEmpty stars (calc_2)=SWITCH(A1, 1, "☆☆☆☆", 2, "☆☆☆", 3, "☆☆", 4, "☆", 5, "")Gray stars filling the remainder up to five

Example code

Markdown template:
<div class="stars-wrap">
  <span style="color:#f59e0b; font-size:20px; letter-spacing:2px;">{{calc_1.value}}</span><span style="color:#ddd; font-size:20px; letter-spacing:2px;">{{calc_2.value}}</span>
</div>
CSS styles:
<style>
  .stars-wrap {
    position: relative;
    display: inline-block;
    color: #ddd;
    font-size: 20px;
    letter-spacing: 2px;
  }

  .stars-filled {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: #f59e0b;
    white-space: nowrap;
  }
</style>