This entry is part of the Conditional Expressions HowTo.
Here is a step-by-step guide about how to dynamically highlight workorders that have a high priority in the WOTRACK application. This is just an example and the same configuration can be used to change the color of a field based on a particular condition.
Define conditional expression
Open Administration – Conditional Expression Manager application. Create the following conditional expression.
Configure WOTRACK application
Open System configuration – Platform Configuration – Applications Designer application and edit the WOTRACK application. Select the first column (Work Order) and open the properties window. Click on Configure Conditional Properties button (on TPAE 7.5 it is in the Advanced tab). Use READ as Signature Option and EVERYONE as the security group. Enter the defined condition WOHIPRI with Property=cssclass and Value=bgred. For a list of all the properties available for each control please refer to this document.
Here is how the Conditional Properties properties should look like.
Verify results
Now all the work orders with a priority equal to 1 will be highlighted in red.
Hello,
is it possible to change colors for records in Start Center's records view???
In the Result Set Setup you should see a 'Display Options' tab.
Here you can color the rows of the result set based on some conditions.
Regards
Hi Bruno,
What if i want to change the colour of a Tab within an application.
Example:
On a Workorder, if there are Related Records, I want the tab to display RED so user's know that there are Related Records for the Workorder.
What's the expression?
Thanks.
In Maximo 7.5, the exercise for changing colors no longer seems to work. Has something changed?
You are right something has changed.
Look at the link I have added at the end of the article.
Hi,
Link doesn't work.
Can you post a new one?
Regards,
Tamir
Link works perfectly
Where is the link, I am not able to find it in the page.
Please advise
Thx
Is it possible to display Classification Attributes in a different color if they are required?
I think it is possible but don't know how complex the conditional expression could be.
Hi Amar check the following link to know:
http://www-01.ibm.com/support/docview.wss?uid=swg21578679
I am trying in 7.5 to change the color attribute if the field contains certain text. Is that doable? Or would the query have to be setup with only items containing the text?
Hi Bruno,
Where is the link? Does changing tab 'Label' color works in maximo 7.5 ?
In that document Sakthivel it refers to commlog, what would be the entry in the expression for the related record
Hi Bruno, I am using Maximo 7.5 and i know we can change the display color under the display options but my questions is can we use a condition to change the color like. Change the color to red with records are with in 10 days of the compliance date or target completion date.
A potential solution:
:targcompdate = TRUNC(:&DATE&)
This will add ten days to the target finish date and trigger. If you happen to go over your target completion date, it will continue to trigger. Put some extra checks like STATUS = ‘INPRG’ so it only triggers on certain work orders. TRUNC is for Oracle, but you will need a different function based on the DB you run on. We do this because Target Finish usually has a time stamp with it so we need to remove the time so the dates are compared accurate.
Database Function Example Purpose
Oracle TRUNC(date) TRUNC(SYSDATE) Truncates date, removing the time component.
SQL Server CAST(date AS DATE) or CONVERT(DATE, date) CAST(GETDATE() AS DATE) Extracts the date part, removing time.
DB2 DATE(timestamp) DATE(CURRENT_TIMESTAMP) Extracts the date from a timestamp.
:targcompdate = :&DATE&
Hi. Bruno.
I am using Maximo 7.6 and I am using Maximo 7.5.
When I change the color of a field using conditional expressions on an non-persistent field on Maximo 7.5 works correctly, but in Maximo 7.6 the behaviour is inconsistent.
Can you have any idea?
Thanks.-
sorry, the comment keeps removing the conditional expression I posted.