Title: colorCondition Post by: Jeremy G. on August 10, 2015, 03:42:54 pm Hello,
I'm searching documentation about widget propertie : colorCondition. What I want : On a table of record, if the article # is 2, I want all the line in red. I tried with this condition : "COLOR = RED WHERE "id" > 2" (the name of my first column is "id") and others test didn't work. Can anyone coud help me please? Regards. Title: Re: colorCondition Post by: Jeremy G. on August 10, 2015, 03:45:38 pm sorry, the condition : "COLOR = RED WHERE "id" > 2"
Title: Re: colorCondition Post by: Stefan S. on August 11, 2015, 08:13:16 am Hello Jeremy,
to have some Colors in the Table we use dialog.setArrayAttributes in the program. To use it you have to create a second array for the arrtibutes. Fill the array... Code
Title: Re: colorCondition Post by: Reuben B. on August 12, 2015, 01:01:10 am Hi,
I would suggest the DIALOG.setArrayAttributes path as suggested by Stefan as it does give you more flexibility, although with a bit more coding required. Hopefully one day we will have a setArrayStyles equivalent so that you can do more than just colour. However to answer your original question, there does appear to be an inconsistency between the documentation and the product, so there will need to be a task created. What I eventually did was create a .per form that worked that had ... EDIT f01 = formonly.field1 , COLOR=RED WHERE f01 <0; .. when I imported that into a .4fd, when I looked at the value for the ColorCondition property that had COLOR = RED WHERE $VALUE < 0 So I suspect the Studio documentation needs to have its examples updated to make it clear that to refer to the value, you use the keyword $VALUE. However you were trying to set the whole line to be red. The COLOR WHERE / ColorCondition only applies to the current field. In a. per when you compile you will get the following error if you try to reference another field. error:(-2045) The conditional attributes of a field cannot depend on the values of other fields. So as suggested by Stefan, I suspect you want to use the DIALOG.setArrayAttributes method . Reuben |