[Legacy] How to :: Custom your tiles’ visibility¶
This is a legacy page that shows you how to configure a tile visibility in code mode. For the new, easy and graphical way of doing things, please see this documentation
Overview¶
One of the main advantages of having different report views on your home is that you will be able to display or hide different tiles according to the selected view.
Temporarily, you will have to switch to code mode and use templating to do so, but don’t worry, it should be available as a studio option pretty soon.
So the first thing to do will be to click the “</>” buttom to access the code mode version of your slide. Then, you have various options.
📝 I want my Marketing department to have a different dashboard than my Sales department. I need to custom the tiles’ visibility.
Basic synthax¶
Show your tile for one view only¶
📝 I want my tile to only be visible for one view only.
visibility: "appRequesters.report == 'Sales department'"
Literraly, this line could be translated to : My tile is visible when my view is equal to “Sales department”. Your tile will therefore be displayed on your home only if you selected the view “Sales departement” in your report selector, and be hidden from all other views.
Hide your tile for one view only¶
📝 I want to exclude some users from my tiles’ visibility.
visibility: "appRequesters.report != 'Sales department'"
Literraly, this line could be translated to : My tile is visible when my view is NOT equal to “Sales department”. Your tile will therefore be displayed on your home except if you selected the view “Sales departement” in your report selector.
Advanced synthax¶
Combining conditions¶
📝 I want to show my tile for two views, and hide it from all others.
visibility: "appRequesters.report == 'Sales department' && appRequesters.report == 'Marketing department'"
Literraly, this line could be translated to : My tile is visible when my view is equal to “Sales department” or to “Marketing department”. In this case, the tile will be displayed for Sales and Marketing views only, and hidden form all other views.
Using the complete object mode option¶
📝 I want to show my tile to a group of users.
If you activated the completeObjectMode option when you created your requester to define the views of your app, you can choose to display or hide your tile for/from a group of views.
For instance, if your views “Marketing department”, “Sales departement” and “Finance departement” belong to a group “Entity departments” from which you want to hide your tile, you can use the following syntax:
visibility: "appRequesters.report.group == 'Entity departments'"
Literraly, this line could be translated to : My tile is visible when group of views is equal to “Entity departments”. In this case, the tile will be shown only if you selected one of the views of the group “Entity department” (in our case “Sales department”, “Finance departement “, and “Marketing department”). All other views that are not included in this group will not see the tile.
Note
If, for any reason, your visibility synthax is incorrect, the tile might “vanish”. Don’t worry : you can access your tile’s configuration from your front configuration file.
`