# Generate URL using SQL Plugin

**URL:** <https://community.squaredup.com/t/generate-url-using-sql-plugin/218>\
**Category:** Dashboard Server\
**Tags:** sql\
**Created:** [October 26, 2016, 7:06pm UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218 "2016-10-26T19:06:32Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhazzard](https://community.squaredup.com/letter_avatar_proxy/v4/letter/d/46a35a/32.png) [@dhazzard](https://community.squaredup.com/u/dhazzard)\
**Post date:** [October 26, 2016, 7:06pm UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/1 "2016-10-26T19:06:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dhazzard](https://community.squaredup.com/letter_avatar_proxy/v4/letter/d/46a35a/32.png) [@dhazzard](https://community.squaredup.com/u/dhazzard)\
**Post date:** [October 26, 2016, 8:39pm UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/2 "2016-10-26T20:39:06Z")

</div>

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=“[http://ticket.system.com/View/](http://ticket.system.com/View/)’, [ID], '”\>’, [ID], ‘\</a\>’) AS ID

---

<div class="post-metadata">

**Author:** ![clarkd](https://community.squaredup.com/user_avatar/community.squaredup.com/clarkd/32/764_2.png) [@clarkd](https://community.squaredup.com/u/clarkd)\
**Post date:** [October 27, 2016, 11:15pm UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/3 "2016-10-27T23:15:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![lafl25](https://community.squaredup.com/letter_avatar_proxy/v4/letter/l/8e7dd6/32.png) [@lafl25](https://community.squaredup.com/u/lafl25)\
**Post date:** [May 5, 2017, 2:14pm UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/4 "2017-05-05T14:14:17Z")

</div>

Hi,

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\>" } } }

---

<div class="post-metadata">

**Author:** ![jannep](https://community.squaredup.com/user_avatar/community.squaredup.com/jannep/32/849_2.png) [@jannep](https://community.squaredup.com/u/jannep)\
**Post date:** [May 11, 2017, 8:56am UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/5 "2017-05-11T08:56:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![patricks](https://community.squaredup.com/letter_avatar_proxy/v4/letter/p/ac91a4/32.png) [@patricks](https://community.squaredup.com/u/patricks)\
**Post date:** [June 9, 2017, 11:19am UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/6 "2017-06-09T11:19:41Z")

</div>

probably the same as [https://community.squaredup.com/answers/question/show-url-in-class-property-as-hyperlink/](https://community.squaredup.com/answers/question/show-url-in-class-property-as-hyperlink/)

---

<div class="post-metadata">

**Author:** ![clarkd](https://community.squaredup.com/user_avatar/community.squaredup.com/clarkd/32/764_2.png) [@clarkd](https://community.squaredup.com/u/clarkd)\
**Post date:** [October 26, 2016, 7:52pm UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/7 "2016-10-26T19:52:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![clarkd](https://community.squaredup.com/user_avatar/community.squaredup.com/clarkd/32/764_2.png) [@clarkd](https://community.squaredup.com/u/clarkd)\
**Post date:** [October 27, 2016, 2:39pm UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/8 "2016-10-27T14:39:31Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dhazzard](https://community.squaredup.com/letter_avatar_proxy/v4/letter/d/46a35a/32.png) [@dhazzard](https://community.squaredup.com/u/dhazzard)\
**Post date:** [October 27, 2016, 3:39pm UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/9 "2016-10-27T15:39:22Z")

</div>

Version 2.3.9

---

<div class="post-metadata">

**Author:** ![clarkd](https://community.squaredup.com/user_avatar/community.squaredup.com/clarkd/32/764_2.png) [@clarkd](https://community.squaredup.com/u/clarkd)\
**Post date:** [October 27, 2016, 11:16pm UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/10 "2016-10-27T23:16:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![robgreen](https://community.squaredup.com/letter_avatar_proxy/v4/letter/r/aca169/32.png) [@robgreen](https://community.squaredup.com/u/robgreen)\
**Post date:** [May 4, 2017, 10:44am UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/11 "2017-05-04T10:44:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jelly](https://community.squaredup.com/user_avatar/community.squaredup.com/jelly/32/812_2.png) [@Jelly](https://community.squaredup.com/u/Jelly)\
**Post date:** [May 5, 2017, 2:45pm UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/12 "2017-05-05T14:45:05Z")

</div>

Awesome! Thanks for this!

---

<div class="post-metadata">

**Author:** ![crowdpleaser](https://community.squaredup.com/letter_avatar_proxy/v4/letter/c/50afbb/32.png) [@crowdpleaser](https://community.squaredup.com/u/crowdpleaser)\
**Post date:** [May 9, 2017, 12:39pm UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/13 "2017-05-09T12:39:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![robgreen](https://community.squaredup.com/letter_avatar_proxy/v4/letter/r/aca169/32.png) [@robgreen](https://community.squaredup.com/u/robgreen)\
**Post date:** [May 12, 2017, 3:16pm UTC](https://community.squaredup.com/t/generate-url-using-sql-plugin/218/14 "2017-05-12T15:16:18Z")

</div>

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