Skip to main content
All CollectionsDashboard
Using contexts to set widget display conditions
Using contexts to set widget display conditions
Updated over a week ago

In DataTile, you can use contexts and anti-contexts to set conditions for displaying or hiding widgets.

A context is a logical expression built on presented controls' options. Before setting a context, you must create all widgets and controls you want to be involved in the context action.

The context menu is on the dashboard settings pane. Here you can add, set, and delete contexts.

Context menu

How to create a new context

  1. Click ‘Add context’ on the dashboard settings pane;

  2. Enter a label of a new context and click on the CREATE button;

  3. Click on the express builder icon on the right of the new context label;

  4. In the opened window choose control and add its options to a new logical expression.

  5. Repeat for other options and controls until the proper logical expression is ready. Stick to the usual rules of logical expression building.

  6. Click on the SAVE button.

How to assign widgets to context

  1. Click on the created context and open the internal context menu;

  2. Click ‘Select widget to add’ and choose a widget that will be connected with the context;

  3. Enter the VIEW mode and check if the context works properly.

Contexts can be applied to any widget, including controls. If a context hides a control, that control becomes inactive.

Anti-context

When using contexts, we set conditions that determine when a widget or control is visible. With anti-contexts, we can invert these conditions, causing the widget or control to be hidden when the conditions are met.

When anti-context hides control, its settings are reset too.

  • To switch on the anti-context, use the '+' icon on the left from the context label;

  • To switch off the anti-context use the 'ghostbuster' icon .

Did this answer your question?