Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am designing in QV 9 and need to set the background color of a text object dynamically. The color will be green if a certain value exists as a field value in the current table. This cannot be based on user selection; instead, it needs to look at all of the values for a given field and turn green if any row has a certain value.
Example from the attached QVW file:
I want to turn the background of the TX01 text object green if the Sheet1 table contains any rows with "DD" in the Name column.
Thanks for any ideas,
Peter
For some reason I can't figure out how to get it to ignore user selections because set analysis is not working. But here is the calculated formula you should use for the color:
max({1} aggr(if(Name='DD',1,null()),Name))*lightgreen()
Regards,
For some reason I can't figure out how to get it to ignore user selections because set analysis is not working. But here is the calculated formula you should use for the color:
max({1} aggr(if(Name='DD',1,null()),Name))*lightgreen()
Regards,
That was it, thank you!
there is another approach as well.
All you have to do is go to the properties of text box:
General --> color --> Base color --> calculated
and write the formula like
=if(fieldindex('Name','DD')<>0,lightgreen())
This will work.
Cheers,
Sharma
Thanks much, Sharma. That is both simpler to read, and has no problems with the user selection. I expect to use this formula so I really appreciate the help.
I agree; Sharma's solution is better!