Forum

This content is now out of date.

Visit Our Community

How can I create a column URL link based on hidden or different column.

Hi,
I have two columns: client_id and ClientName. I can easily reach the client's page with The URL https://www......files.aspx?client_id=## from client _id column. But I want to hide client_id column and be able to click ClientName to reach client's web page.
Is that possible to do? I am using Yellowfin 6.3

Thank you.

P.S. I found similar question answered here, but this approach does not resolve my problem.
Hi,

There are a couple of ways you might be able to accomplish this, but they will depend on what database you are using and your permissions are.

The first is to create a calculated field in the report that basically creates the html for the link you are after. This works for databases that use the '+' character for string concatenation (for example, SQL Server).

My calculation looks like this:


Forum image


From there, you will need to add this field to your report and then format the column using the HTML Formatter, with the Remove HTML tags option set to OFF.


Forum image


What this basically does is read the html we have built into the calculation, creates the link using the ID field, then displays the Name field.

An example of my output is here:


Forum image


Alternatively, you can create a Freehand SQL calculated field (either at the View or Report), depending on your role permissions. Your calculation will look something like this:

[code]'' + "CAMP"."CAMPDESCRIPTION" + ''[/code]

Depending on your database you may need to change the '+' characters to '|' or '||', or look for the string concat function available.

Also, note that the screenshots above are from Yellowfin 7.1, but the same formatter and calculation functions are available in 6.3.

Let us know how you go.

Regards,
Teresa
Hi Teresa,

Thank you for the response. I followed the steps you have outlined; I can use both options: calculated fields in the report or freehand SQL on the view level. Attached is my calculated field.
It does not say that it is invalid, but when I run report, the following error pops up:
Error retrieving results

An error occurred retrieving the results from the database.Please check the SQL syntax and try again.


When I am building a freehand SQL field in the view, it says that SQL is incorrect.

I think, it has to do with the field "client_id" that is integer and everything else is a string. I tried to convert it as CAST(client_id AS VARCHAR(10)), but with no luck.

I appreciate your help.

Thank you,

Liana

Hi Liana,

sorry for the delay, somehow this post "slipped through the cracks", for both of the errors you described we would like to see the errors generated in the log files, so could you please generate the errors again and then zip up and email us all of your log files (please reference the subject of this forum post).

Also, could you please tell us what database you are using, and also show us the SQL you were trying to use in the view.

regards,
Dave

Thanks for trying Yellowfin

Please complete the form below to request your copy of Yellowfin today.