Conditional List Item Configuration

Conditional List Item Configuration

In our example patient object so far, we have defined a small number of fields, including one True/False field called allergic.

Let us go back to the issue of defining a widget to show each patient (each List Item) in the patient list.

Suppose we want to show not only name and date of birth, but also to indicate clearly those patients who are allergic.

The easiest way would just be to add the allergic field just like we added the name and date of birth fields.

To remind you how to navigate to the List Item Widget editor:

Go into the App
In the App Structure, click on the LISTING component we defined
Now in the Edit panel which appears on the right, click the Edit icon for "List item configuration"

Ok, now to add the allergic field to the Widget, we could just select the Row, and add it to the Row like this shown below:

That would give us three columns and the last column would show just "true" and "false".

An alternative and clearer marker of the status allergic could be to have the list show an icon against all patients who are allergic and nothing where the patients are not allergic. This is how to do that.

Select the Row
Add an icon to the Row by navigating as shown below

Select the Icon in the left panel and then in the Edit panel on the right, click +Visibility Condition which allows you to select a True/False field of the Object (type) listed

.. and then we can say whether for this element to be showing, the selected True/False field should contain either true or false as value.

Then we see something like this (the symbol indicating allergic).

No items found.

Conditional List Item Configuration

Conditional List Item Configuration

In our example patient object so far, we have defined a small number of fields, including one True/False field called allergic.

Let us go back to the issue of defining a widget to show each patient (each List Item) in the patient list.

Suppose we want to show not only name and date of birth, but also to indicate clearly those patients who are allergic.

The easiest way would just be to add the allergic field just like we added the name and date of birth fields.

To remind you how to navigate to the List Item Widget editor:

Go into the App
In the App Structure, click on the LISTING component we defined
Now in the Edit panel which appears on the right, click the Edit icon for "List item configuration"

Ok, now to add the allergic field to the Widget, we could just select the Row, and add it to the Row like this shown below:

That would give us three columns and the last column would show just "true" and "false".

An alternative and clearer marker of the status allergic could be to have the list show an icon against all patients who are allergic and nothing where the patients are not allergic. This is how to do that.

Select the Row
Add an icon to the Row by navigating as shown below

Select the Icon in the left panel and then in the Edit panel on the right, click +Visibility Condition which allows you to select a True/False field of the Object (type) listed

.. and then we can say whether for this element to be showing, the selected True/False field should contain either true or false as value.

Then we see something like this (the symbol indicating allergic).

Next Step:
No items found.