Solved

Conditional formatting without specific column in forms

  • 4 March 2020
  • 9 replies
  • 128 views

Userlevel 5
Badge +20

Setting conditional formatting without setting a specific column and without condition is now only working in grids. It can be used to show a data in a grid with a different font.

Unfortunately this is not working for the same table for fields in a form. 

Why not? 

 

icon

Best answer by Jasper 13 March 2020, 13:41

View original

9 replies

Userlevel 5
Badge +5

Hi Harm,

Currently the form only applies column specific Condition Layouts.

I think the case you subscribe is valid. I don't think you want to influence form control background for all controls at once, because you will loose information about fields being readonly, mandatory or regular.

Would you please bring up a idea on our Community?

Regards,

Erik

Userlevel 3
Badge +11

Why would you do this for ALL fields in a form?

Userlevel 7
Badge +11

It has actually been a deliberate choice, from a user experience point of view, to use conditional formatting of the entire row only in the grid and not in the form.

@Harm Horstman Do you have a specific use case to want this for all columns in the form?

Userlevel 5
Badge +20

New functionality in an existing application, has a lot of code fields, for this we found out to that is good to make use of a Fixed Width (Consolas) font. Because with this font, for example, the difference between 0 (number zero) and O (letter O), is easier to read.

We don’t want to change the default font and bother other users with this experiment.

What we actually want, is the option to setup a default font for the grid an for the form per table.

Userlevel 5
Badge +5

We are working towards a situation where Conditional Layouts could only influence the font being bold and/or italic. Our Universal GUI will not allow you to influence the font family in any kind of way. The reason is, that is not very user friendly to work with several font types side by side. The idea is that our UI/UX experts will choose the right one for all our customers at once.
 

Same for the SF Theme.

Userlevel 5
Badge +20

Ok, for the Universal UI, I can understand this.

 

Userlevel 7
Badge +11

What we actually want, is the option to setup a default font for the grid an for the form per table.

 

What you could do is use the dynamic model feature to automatically create field based conditional formatting based on table or column tags. Whould that be an option?

Userlevel 5
Badge +20

Perhaps that is a good solution, but I do not yet see how that will work

Userlevel 7
Badge +11

Hi Harm,

To automatically add a conditional layout for all columns with a specific column tag (for example `font`), create a control procedure in the Dynamic model screen with the following code:

insert into conditional_layout (
project_id,
project_vrs_id,
tab_id,
conditional_layout_id,
col_id,
font_id
)
select
t.project_id,
t.project_vrs_id,
t.tab_id,
t.col_id + '_font' as conditional_layout_id,
t.col_id,
'my_custom_font_id' as font_id
from col_tag t
where t.project_id = @project_id
and t.project_vrs_id = @project_vrs_id
and t.tag_id = 'font'
and not exists (
select 1
from conditional_layout c
where c.project_id = t.project_id
and c.project_vrs_id = t.project_vrs_id
and c.tab_id = t.tab_id
and c.conditional_layout_id = t.col_id + '_font'
)

Now you only have to add this tag to the relevant columns.

Reply