Badge Management

Mise à jour le 18 septembre 2026·

Introduction #

The badge management module in Silicon ioi allows configuring up to four badges per Doctype (document). These badges display dynamic information extracted from the corresponding document, in either numeric or textual form. You can also condition their visual appearance (background and text color) based on the values.

Badge Configuration #

Disabling Standard Badges #

The system includes a set of preconfigured standard badges, marked as [x] standard. If you wish to replace them, disable them using the Enabled checkbox.

Creating a Custom Badge #

Basic Steps: #

  1. Create a new record and specify the target Doctype.
  2. Select the display location from the following four options:
    • Top / Right
    • Top / Left
    • Bottom / Right
    • Bottom / Left
  1. Define the roles authorized to see this badge.\nThis allows displaying different badges in the same location, provided that the roles are mutually exclusive.
  2. Specify the refresh interval (in seconds).

Attention

Avoid using heavy scripts or SQL queries with too frequent refresh intervals.

Value Type Definition #

  • Choose the expected result type (text or number).
  • Specify the default value if the code returns none.
  • Decide whether the badge should be displayed even without a value.
  • Specify the maximum displayable length.
  • Add a tooltip to explain the meaning of the displayed value.

Advanced Customization – Code #

  • Choose the scripting language: SQL or Python.
  • Define the default background color.

The code can return up to three outputs: #

  • The displayed value
  • The background color
  • The text color

In SQL #

In Python #

Attention

It is essential to test your code before deployment.

Performance Recommendations #

⏱️ Script execution time must never exceed 0.1 seconds.

Security #

Access to badge configuration must be strictly limited to system administrators.

Cette page vous a-t-elle aidé ?