Submitted by DragonGem on 2018/09/15 12:15
 I have a PickList grid where the individual Items have a Named Color Field (pickColor) attached. I would like the color any Item that references those PickList Codes to automatically assume the Color associated with the PickList Item. I've tried the following SQL query:
     SELECT pickCode as calCode, pickColor as ItemColor from PICKLIST
but ItemColor doesn't change. So I introduced a secondary field (myFillColor) to verify that the SQL was working correctly.
     SELECT pickCode as calCode, pickColor as myFillColor from PICKLIST
This set the value in myFillColor as expected. As an experiment, I then set the Row Equation of ItemColor to:
     =[myFillColor]
and now ItemColor also changed as expected. I then selected myFillColor as the Item Background Color in the Options for the database and myFillColor would no longer change automatically. 
 
CONCLUSION: You can't always (ever?) set Item Properties directly via SQL Queries for a Field.

Comments

Hi DragonGem !
 
Confirmed and fixed in the next version
(fields marked as "System" were not assigned in this particular case)
 
HTH !
 
Pierre_Admin
IQ Designer
 

DragonGem

2018/09/19 10:22

In reply to by Pierre_Admin

Well, that was easy!! Thanks for the quick consideration, Pierre.

Actually, the more i play around with the myFillColor / myTextColor solution, the more I'm liking it. It works as a Default and still allows for a temporary overriding by setting ItemColor and ItemForeColor manually on a case-by-case basis. Best of both worlds.

 Dragon Gem Mindworks

[quote=DragonGem]
I then set the Row Equation of ItemColor to:
     =[myFillColor]
and now ItemColor also changed as expected.
[/quote]
In most cases, you're better off using an auto-assign rule instead of a row equation for ItemColor, as you're likely to have many conditions which could change the item color (mark as done is one obvious one)
 
Pierre_Admin
IQ Designer
 

DragonGem

2018/09/19 17:20

In reply to by Pierre_Admin

Pierre, thanks for the suggestion. I'm still coming to terms with the variety of assignment options available. Just digging into the User Defined Functions which will be helpful for identifying particular situations. 

 Dragon Gem Mindworks