Logical Operators In Table Column Translation List

Hi

I am wondering if it possible to have <= , >= or != etc in the background color translation list in a table. I can only get it to work when a value is equal to a value in the column.

Thanks

Aidan


We don’t have those operators right now. However, you can do the same in your SQL query. You can do something like:SELECT CASE WHEN value <= 15 THEN 1 WHEN value > 15 THEN 2 ELSE 3 END FROM Table..Then your background color mapping is simple. Hope this helps.

Hi Travis

Thanks for reply. I have used the case feature before but it will color the entire row. It would be a nice feature if the translation list would work with relational operators. Sometime in the future maybe??

Thanks

Aidan

yes, I hope that something better is implemented so that we can color individual cells.

Good idea - I’ve added a ticket for this feature

I don’t know if you are using direct bindings or scripting to populate the table, but here is what I use when I am using scripting to populate a dataset:

<html><p style="color:rgb(%s);background-Color:rgb(%s);">%s</p></html>'%(textColor, bgColor, message)

Granted, using this will only color the text in the cell and the text color, not the entire cell.

Carl, whats the chances of more customization for cell backgrounds being made available? In particular, I would love to be able to just assign the cell background based on the alert status of the tag in each cell.

this is a competitors software, cygnet.


Well the tricky thing here is that our Table component is really general-purpose. It has no notion of the concept of a tag, so there is no “tag” associated with a row. For all it knows the data came out of a SQL database and has nothing to do with tags.

I have a vague idea for a more generalized table-like component that would let you essentially define a wide container as a “row template” that would then at runtime become duplicated X times with different values for some property. This would let you build extremely customized “tables” that could do whatever your heart desired. (As well as a host of other useful things) Still on the drafting table though.

thanks Carl. I hope you guys can get something figured out. I believe this would be a very nice feature for alot of users.