About format rules in different views Hi all...

About format rules in different views

Hi all,

Iโ€™m trying to use 2 or 3 different format rules for the same data, depending on the appโ€™s view that the user is currently displaying.

For each rule I use the condition #view=xxxxx , as indicated in the expression assistant but itโ€™s not working: when the condition is set, the rule doesnโ€™t work and if I remove the condition, the last rule is applied (as intended)

I also tried to make a slice of data, but canโ€™t apply the rule to a slice, only to tables.

Am I doing something wrong? Any ideas to display the same data with different format depending on the view you are using?

Thanks in advance.

0 5 2,085
5 REPLIES 5

@Mario_Monsalve Format Rules is applied to column, regardless of the UX the user is displaying. But can you elaborate your issue a bit more? Do you have the same column in more than one UX view?

Hi @Levent_KULACOGLU and thanks for your reply.

I have 1 table with (letโ€™s say) column NAMES and column POSITIONS.

In the first view (โ€œGROUP_VIEWโ€) I want to group data by POSITION and then each name with the same position sorted alphabeticvally. Itโ€™s done and it works OK. In this view the data stored in column POSITION must be formatted in bold green.

In the second view (โ€œDETAIL_VIEWโ€) I want all the info for each person (like a detail view) and data stored in column POSITION must be without format (black, regular size, no bold, etc).

So I set a format rule in which condition is #view=GROUP_VIEW (as the expression assistant says) and format is color=green, bold=true.

But the condition doesnโ€™t work. In both views, the POSITION is viewed in bold green.

Soโ€ฆone table, two views, the same data in both views but with different format in each one.

Any help would be much appreciated. Thanks!

You cannot target a format rule to a specific view using expressions, as you are attempting. Instead, youโ€™ll need to create additional (virtual) columns for the specific views and apply the view-specific formatting to them.

For instance, you could create a virtual column, [POSITION_GV] (GV for GROUP_VIEW), with an App formula of =[POSITION] (so itโ€™s always an exact copy of [POSITION]). Then remove [POSITION] from GROUP_VIEW and replace it with [POSITION_GV]. Finally, in your format rule to make position bold green, again replace [POSITION] with [POSITION_GW].

Hi, Steve and thanks for your reply.

Your solution works perfectly. Just one more question: could this method affect the appโ€™s performance if I set up 3 or 4 virtual columns, for different views and the table has too many rows (200-300)?

Anyway, if itโ€™s possible, Iโ€™d like the developers to explore the posbibility of using different format rules for different appโ€™s views. I think it could be useful for many users.

Once again, many thanks for your help!

@Mario_Monsalve Unless you have a huge dataset (thousands or tens of thousands of rows), I donโ€™t know that I would be terribly concernedโ€“especially given that thereโ€™s no alternative. Itโ€™s not optimal, but itโ€™s what weโ€™ve got.

Top Labels in this Space