Thursday, August 21, 2008

OBIEE Conditional Hyperlink

A customer wanted a conditional hyperlink.
If the turnover was greater then 100000 it should show a hyperlink else only the number

Here is how we did it:


CASE WHEN ("F1 Revenue"."1-01 Revenue (Sum All)"> 100000 )THEN '{a href=http://www.google.com }'CAST("F1 Revenue"."1-01 Revenue (Sum All)" as VARCHAR(10)) '{/a}' else CAST( "F1 Revenue"."1-01 Revenue (Sum All)" as VARCHAR(10) )END

Don't forget to set the column data type settings:




Till Next Time



8 comments:

Anonymous said...

Hello John Minkjan, I hope you receive this comment and are able to provide input. I want to create a web link in a situation very similar to this. But the URL of my link is stored in a database field. Rather than using the hard-coded value of "http://www.google.com" in the original post's example, what syntax can be used to dynamically refer to any URL value stored in my table, "LinksTable"."URLpath"?

John Minkjan said...

Hi Tory,

Did you try replacing '{a href=http://www.google.com }'CAST
with '{a href=http://'||MyUrlPathColumn ||' }'CAST

regards

John

Anonymous said...

Hello John,

It´s possible use parameters in the URL? Ex: http://www.google.com?@1

I can´t use the narrative view in this case, because I´ll use the column values in the URL

Thanks.

John Minkjan said...

@Anonumous,

Which parameters do you want to use? Repository or Session? see: http://obiee101.blogspot.com/2008/02/obiee-adding-session-variables-to.html

regards

John

Anonymous said...

Hi John,

Sorry, but I don't speak english very well.
I have a page name with special characters, when I acess first time my dashboard page i have an error, the page /portal/... not found, but when I acess a page that don´t have special characters it´s normal, the page that I didnt acess, because the special characters its working very well too.
Can you help me?

Thanks,

LeoVillarroel said...

Hi John:

Unfortunately I don't have the formatting option of HTML as "overwriter" for text values, so in a desperately attempt of make this work, could you please post the XML definition for the HTML column with the hyperlink values?.

Thanks.
Leo.

Ramya said...

Hi John,

In OBIEE, I have created a chart and i want to navigate to some report while clicking on that chart. Since the path of the report and the path of the Answers main page is same it is showing Answers main page only. Pls help me in this.

Unknown said...

Hello,
I wonder if you can help me in the following situation: I have two answers that turn in two tables (total and detail), in Oracle BI 10g and would like to put a link in the table total so that when you click it's open in a new tab the Detail table.
Sorry my english. I hope you can help me.
thanks