Generate URL using SQL Plugin

Version 2.3.9

I’m using the sql plugin to pull some ticket information from our Service Manager data warehouse. I can use CONCAT(’<a href=“url”>, [ID], ‘</a>’) when I run the query, but it doesn’t render as a URL when displayed. It just displays as <a href="">IR12345</a>.

Anyone tried this?


Just a placeholder. It would actually contain a rendered URL that a user could click on.

Here’s the first part of my SQL query:

SELECT TOP 10 CONCAT(’<a href=“’, [ID], '”>’, [ID], ‘</a>’) AS ID

1 Like

Unfortunately it looks like HTML that is returned by the query is not displayed - presumably for security reasons. There might be alternative options available in Squared Up Version 3 - have you taken a look at that yet?

1 Like


I can’t exactly answer you for v2 but I will share this for anyone that might want to do this with SquaredUp v3.

To make a value from a SQL Query widget clickable as a URL, you have to edit the JSON.

After creating the widget from the interface, edit the JSON to add a Display section (right after the Source section) with a columnOverrides. {{value}} will equal the ID value for each row. In the example below, it will open a Chanque Request on my Cireson Portal for Service Manager :

"display": { "columnOverrides": { "id": { "template": "<a href='https://servicedesk/ChangeRequest/Edit/{{value}}' target='_blank'>{{value}}</a>" } } }

We have talked to Squaredup regarding generating an URL from an SQL query and they are on the case and we have sent in examples on how it should work so hopefully it will be there in an upcoming version.

probably the same as

Could you expand on your query a little more? What is ‘url’ in the href?

Thanks for your reply - this should really have been another comment rather than an answer though.

Nevertheless, what version of Squared Up are you using?

Version 2.3.9

Thanks - I’ve replied as an answer below but it looks like HTML doesn’t get displayed.

I’m also interested in this. I have a SQL query pulling in data including trends (currently as text showing “more” or “less”) however I want to be able to visualise this with Up/Down arrows and I was hoping to embed the HTML in the Query and for the SQL plugin to show the HTML image.

Awesome! Thanks for this!

Great to see lots of interest in this topic. You’ll be pleased to hear that this functionality will be making its way directly into the product in forthcoming enhancements to the SQL Tile. These enhancements are currently targeted at the v3.2 release.

Thanks for this! I used this method to replace the value with an image of the same name