Submitted by carloscadu on 2020/08/22 11:20
 Hi,
I'd appreciate your help.
Besides the field 'nbParents', does IQ provide other default identification that an item has more than one parent?
Since I'm not aware of other visual identification than 'nbParents' field, I'm trying to create a conditional format to change item's font color if it has two or more parents ('nbParents' field > 1).
It is the first time I'm dealing with the conditional functionality in IQ and found difficult to set it by myself.
Could someone provide how should I set the conditional format to color the items given the mentioned condition?
Thank you very much,
Carlos
 
 

Comments

Tom

2020/09/10 16:23

In reply to by carloscadu

I tested this below (using background colour instead of font colour for the test) in the item field. It doesnt work, but I seem to have no nbParents field. There is also no nbParents field in the sample database/s. Am I missing/forgetting something (certain fields hidden or something like that?)

[nbParents]> 1                      BackColor=&hFF9BAF
 
 

Pierre_Admin

2020/10/01 17:48

In reply to by Tom

Hi Tom and Carlos,
 
This works fine here... I don't recommend putting a conditional format on the Item field, as it is used in all grids. nbParent would be a better one
Remember: the nbParent field must be shown in the grid for this to work ! (as are all fields referenced in conditional formats)
 
Pierre_Admin
IQ Designer
 

lucasd

2020/10/01 18:42

In reply to by carloscadu

Here's one way you could do it: 
  1. Go to "Manage Fields" and select the "Item" field. 
  2. Go to Conditional Formats for the "Item" field.
  3. Create a conditional formattting rule with the following criteria: [nbParents]>1
  4. Under "Formats", write: BackColor=Green
  5. Create a second conditional formatting rule with the criteria: [nbParents]<2
  6. For this second rule, add the format: BackColor=;
The first rule makes the background color green for any items that have more than 1 parent. The second rule makes the background color normal for any items that have 1 or 0 parents. (The second rule would be for situations in which an item changes, for example, from having 2 parents to having only 1 parent.)
 
[EDIT: Looks like Pierre posted at the same time as me. You could follow my instructions but do it for the nbParents field, as per his suggestion.]