The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday noon (PST)
The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday noon (PST)
Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Add Colour

Highlighted
ponguru1224
Occasional Advisor

Add Colour

Hello All,

Could you please help me how to add a colour code in sql query.

Thanks,

Subbu.

 

2 REPLIES
Rich Y_1
Member

Re: Add Colour

Below is some of my code..  Hope it helps

 

SELECT (select case when r.assigned_to_user_id is null then '<font color="#FF0000"><b>***Not Assigned***</b></font>' when '[SYS.USER_ID]' = r.assigned_to_user_id then '<font color="GREEN"><b>'||u.username||'</b></font>' else '<font color="BLUE"><b>'||u.username||'</b></font>' end from knta.knta_users u where u.user_id = case when r.assigned_to_user_id is null then 1 else r.assigned_to_user_id end) ASSIGN_TO
FROM knta.KCRT_REQUESTS r,
knta.kcrt_request_types c
where c.request_type_name = 'XYZ Request'
and c.request_type_id = r.request_type_id
and r.STATUS_CODE = 'IN_PROGRESS'

Derek Giedd
Frequent Visitor

Re: Add Colour

If you need to add a color code for a chart portlet, you can define a field in the datasource and give it a value as below.  If you name this field color, then just select the "Color" field for the Color Source in the portlet definition. This example sets the color of the wedge, line or bar based on the status. 

decode(upper(status_name), 'NOT SUBMITTED', 'Yellow', 'PENDING INITIAL ANALYSIS', 'Blue', 'PENDING MORE INFO', 'RED', 'PENDING CLOSURE', 'Light Red', 'Black')

-- Remember to give Kudos to answers! (click the KUDOS star)
//Add this to "OnDomLoad" event