Submitted by Armando on 2010/06/28 01:28
Hello,
 
 
I spent at least 12 h last week trying to homogenize formatting and colors in my DB and I haven't succeeded. I'm exhausted.
 
Sometimes conditional formats work, sometimes they don't.
 
I checked that all the necessary columns are there in the right grids, etc. and they are, etc.
I'm not an IQ newbie and so I think I should be able to have conditional formatting work properly by now.
 
 
I have a few questions :
 
1- Formatting seem to proceed as "IF" (e.g. : if notes<>0 then BackColor=&h6EECFF, if task<>0 then BackColor=&h00DDFF, etc.).
     a-- Is that  so ?
     b-- And if yes, does that effectively mean that the first "met" condition (true) is superceded by the last "met" (or non-met) one ? (in other words : When several fields act on a conditional formatting, which one has priority... The last met one or the last non-met one ?)
 
2- Formatting also depends on columns/fields being present in the grids (and if they are not present, an error message appear, etc.).
     a-- Does the column order have any impact on the formatting (e.g. the task column appears on the left of the item column, and the project column appears on the right of the item column and so it comes after the task column ) ?
     b-- If it does have an impact, what's the rule ? (e.g. can the order of column  affect the priority in which the various conditional formatting is applied ?)
 
3- As different grids display different sets of columns, the "invalid conditional format" error message appears almost for each grid I open.
Of course, I cannot have all columns needed for all the different formatting appear in all grid. That would be ridiculous. So I usually ignore it, and all is fine.**
 
So, question is :
      a-- Can the "invalid conditional format" error message affect other conditional formats than the one mentioned in the error message (in other words : do other working conditional formatting cease to work because there's an "unrelated" error) ?
 

4- And, lastly... I have some fields that appeared filled with data thanks to some SQL requests in the options, such as : <source>SELECT ItemID, [ItemID]>0 AS WIKITagYN FROM ¯qWIKITag WHERE ( not isnull([WIKITag]) );</source>.
 
These fields seem to be able to be used for conditional formatting, however, they seem to be superceded by other "normal" fields (filled with data). (I'm saying so as they don't seem to alkways have an effect, depending on what field comes before them in the conditional formatting list)
 
       a-- Is that the case ?
       b-- If not, what,s the rule ?
 

Conditional formatting is an important aspect of IQ.
I'd really like to be able to use it properly but I fail to do so.
What am I doing wrong ? Is it me or is it bugs ?
 
 
Thanks for taking the time to clarify and / or fix this. I'm sure all users will benefit -- whether they do now or later, when they'll need conditional formatting.
 
 
==
 
P.S. : Like I said before : I don't mind the fact that a grid needs to have certain "columns /fields" displayed (the conditions) to be able to show certain formatting. And I actually like this as it allows to treat a field differently from one grid to another, etc.
 
 

Comments

Another question : Is there a maximum number of conditions for a field after which the next ones won't work ?

[ EDIT  2010 06 30 -- 02 23: INFO IN THIS POST IS STILL RELEVANT. HOWEVER, THE NEXT ONE OFFERS SIMPLER STEPS TO REPRODUCE THE PROBLEM]

Hi Pierre, I guess you're busy.


If you don’t want to read all that, go straight to the “Steps to reproduce”, after the table.

 

================

 

When you have the time, it would be good to know more about the "inners" of conditional formatting.


I think I found a behaviour that’s completely predictable, however. The problem seem to be linked to the number of conditions in the conditional format section, and maybe even the number of conditions in between 2 conditions that are “met” and should apply.


Here's an example and how to reproduce it.

Fields in the conditional format section are All YN fields

 

The Yellow zone represents the zone which doesn't adversely affect any other conditions.

The green zone represents the zone where any conditions put there cancels the last condition, even if it is met.

The red zone represents the zone in which conditions are not working If other "met" conditions are located in the "green zone" 

 

If I move any condition from the green zone to yellow zone, what wasn't working starts working. Weird. I tried with several configurations and it's always the same pattern

 

(You don’t need to understand all that. Just follow the steps after the table.)

 

What these conditional formats do is :

 

A-    color the WikiTag cell into a dark yellow (almost orande by default (&h00DDFF) ,

B-     and only when the field has something into it will it be coloured with a light yellow (&h6EECFF)

 

 

 

Appointments<>0

BackColor=&h00DDFF

Task<>0

BackColor=&h00DDFF

SoftwareRef<>0

BackColor=&h00DDFF

Étape<>0

BackColor=&h00DDFF

zzReference<>0

BackColor=&h00DDFF

Followup<>0

BackColor=&h00DDFF

NotesDivers<>0

BackColor=&h00DDFF

Besoin<>0

BackColor=&h00DDFF

Objectif<>0

BackColor=&h00DDFF

Reference<>0

BackColor=&h00DDFF

Projet<>0

BackColor=&h00DDFF

Tactique<>0

BackColor=&h00DDFF

DoAcYN<>0

BackColor=&h00DDFF

Souhait<>0

BackColor=&h00DDFF

WIKITagYN<>0

BackColor=&h6EECFF

 

 

==================

 

 

Steps to reproduce (not that long):

 

Preparation

 

1-      Create all the fields shown in the above table. All YN fields. Simple.

 

 

2-      In the  WikitagYN field you created, add this in the options section:

 

<source>SELECT ItemID, [ItemID]>0 AS WIKITagYN FROM ¯qWIKITag WHERE ( not isnull([WIKITag]) );</source>

 

(This field will appear as checked when something is added to the WikiTag field.)

 

 

3-      In the standard WikiTag text field : reproduce the config appearing in the above table  (conditional format section).

 

It’s easier to do use exactly the same field names but if you don’t want to :

 

a-      The important aspect is that their should be the SAME number of conditions, all YN fields.

b-      you should be aware of their exact position in the table. (I suggest you reproduce a similar table and color the zones)

 

 

4-      Create a grid :

 

a-      All involved YN fields are displayed

b-      the WikiTag text field should be there too (Note that filling the WikiTag text field will check the wikitagYN field, and proper conditional formatting will appear after a refresh)


c-      Order of columns doesn’t matter at all.

 

 

5-      Create 2 items : one with WikiTag field filled, one with nothing in it. The one with the WikiTag field filled should already appear with a pale yellow shade.

 


Process to reproduce

 

So this is WORKING :

 

-1-

 

a-      Item with WikiTag field filled : appointment is checked

 

It appears with a LIGHTyellow shade, as expected.

 

b-      Item with WikiTag field NOT filled : appointment is checked

 

It appears with a DARK yellow shade, as expected.

  

-2-

  

c-      Item with WikiTag field filled : Reference is checked

 

It appears with a LIGHTyellow shade, as expected.

 

d-      Item with WikiTag field NOT filled : Reference is checked

 

It appears with a DARK yellow shade, as expected.

 

 

 

NOT WORKING:

 

-1-

  

e-      Item with WikiTag field filled : task is checked

 

It DOESN'T appears with a LIGHT yellow shade, but with a DARK SHADE.

  

f-       Item with WikiTag field NOT filled : task is checked

 

It appears with a DARK yellow shade, as expected.

 

But, basically, the WikiTag field never changes color : it stays DARK YELLOW, even when it should be a light yellow.

 
 

-2-

 

g-      Item with WikiTag field filled : task AND Project are checked

 

It DOESN'T appears with a LIGHT yellow shade, but with a DARK SHADE.

  

h-      Item with WikiTag field NOT filled : task AND Project are checked

 

It appears with a DARK yellow shade, as expected.

 

So even if a field is inside the Yellow zones is checked, as soon as a field in the green zone is checked, it cancels the condition in the red zone.

 

Same thing for any item with a field in the green zone meeting the condition.

 

 

 

I’d be glad if someone has the patience to try that and report results.

Armando

2010/06/30 02:20

In reply to by Armando

I was able to reproduce the same issue with a sample DB in the welcome grid.
 
Instead of using my own fields, I used the YN fields from the sample DB, and replaced the WikiTag field by the "Amount" field which doesn't need an extra YN field to trigger its format.
 
 
 
1- Reproduce this exact grid :
 
 
 
 
2- Configure the Conditional format section of the amount field to look likethis :
 

AddressBook<>0

BackColor=&h00DDFF

Billing<>0

BackColor=&h00DDFF

Check<>0

BackColor=&h00DDFF

Finances<>0

BackColor=&h00DDFF

Invoices<>0

BackColor=&h00DDFF

MapViewDemo<>0

BackColor=&h00DDFF

MusicLibrary<>0

BackColor=&h00DDFF

NextWeek<>0

BackColor=&h00DDFF

OK<>0

BackColor=&h00DDFF

Paid<>0

BackColor=&h00DDFF

Projects<>0

BackColor=&h00DDFF

Reference<>0

BackColor=&h00DDFF

SampleGrids<>0

BackColor=&h00DDFF

ShoppingList<>0

BackColor=&h00DDFF

Amount > 0

BackColor=&h6EECFF

 
 
(Follow the EXACT same condition/field order)
 
 
 

Process to reproduce the problem

 

So this is WORKING :

 

-1-

 

a-      Item with amount field FILLED + AddressBook  is checked

 

It appears with a LIGHTyellow shade, as expected.

 

b-      d-      Item with amount field EMPTY + AddressBook  is checked

 

It appears with a DARK yellow shade, as expected.

  

-2-

  

c-      Item with amount field FILLED + Reference is checked

 

It appears with a LIGHTyellow shade, as expected.

 

d-      Item with amount field EMPTY+ Reference is checked

 

It appears with a DARK yellow shade, as expected.

 

 

 

NOT WORKING:

 

-1-

  

e-      Item with amount field FILLED + billing is checked

 

It DOESN'T appears with a LIGHT yellow shade, but with a DARK SHADE.

  

       f-       Item with amount field EMPTY + billing is checked



It appears with a DARK yellow shade, as expected.


But, basically, the AMOUNT field never changes color : it stays DARK YELLOW, even when it should be a light yellow.

 
 

-2-

 

g-      Item with amount field FILLED + Billing AND Paid are checked

 

It DOESN'T appears with a LIGHT yellow shade, but with a DARK SHADE.

  

h-       Item with amount field EMPTY + Billing AND Paid are checked

 It appears with a DARK yellow shade, as expected. ...  But that's not the problem, of course. The one before is.

 

So even if a field is inside the Yellow zones is checked, as soon as a field in the green zone is checked, it cancels the condition in the red zone.

 

Same thing for any item with a field in the green zone meeting the condition.

 

Pierre_Admin

2010/06/30 21:55

In reply to by Armando

OK, this is fixed in 0.9.25pre-rel26.
 
Also note:
  1. A popup notification is no longer shown when a column, part of a conditional format, is missing from the grid. The message only appears if the conditional format syntax is wrong
  2. Mantis 1005: Field conditional format: add Save and Load from text file makes editing much much easier
 
 
 

Armando

2010/07/01 01:47

In reply to by Pierre_Admin

Thanks. Hopefully my explanations were clear...
I like Mantis 1005. Yes, this should really make it easier !
 
(One thing that's still hard is to have a global view of all auto-assign rules, equations, etc. Wow, when there are lots of functions running in the background, finding where a mistake lies can sometime be cumbersome...)

Armando

2010/07/01 17:13

In reply to by Pierre_Admin

[quote=Pierre_Admin]
OK, this is fixed in 0.9.25pre-rel26.
 
Also note:
  1. A popup notification is no longer shown when a column, part of a conditional format, is missing from the grid. The message only appears if the conditional format syntax is wrong
  2. Mantis 1005: Field conditional format: add Save and Load from text file makes editing much much easier
 
[/quote]
 
 
The fix doesn't work, as told in an email and there :
 
or
 
Anybody else seeing weird things with conditional formatting?
Like I said almost none works here and so I had to revert to the previous version because my IQ usage depends on conditional formatting a lot.
 
Thanks.

Pierre_Admin

2010/07/01 17:24

In reply to by Armando

I've uploaded a new version (same number). Please try it and report back
 

Armando

2010/07/01 17:44

In reply to by Pierre_Admin

[quote=Pierre_Admin]
I've uploaded a new version (same number). Please try it and report back
 
[/quote]
 
AH! Thanks for the quick fix. Now it seems to work well.
And the export/load conditional formats is great.