This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Creat Hyperlink in SWQL

Hi everybody,

I want to show a clickable link in solarwinds with SWQL query to open the page of a ticket, I've tried the codes below but it shows code context such as "<a href="https://page.address.com/browse/ITS-139650">ITS-139650</a>" instead:

SELECT

   concat('https://page.address.com/browse/', Nodes.CustomProperties.textbox) AS [textb],

   '<a href="https://page.address.com/browse/'+ Nodes.CustomProperties.textbox + '">'+ Nodes.CustomProperties.textbox +'</a>'AS [textb],

   CONCAT('=HYPERLINK("https://page.address.com/browse/', Nodes.CustomProperties.textbox, '")') AS [textb]

FROM Orion.Nodes NODES

How can I solve this issue?

  • As an example you could use something like this:

    SELECT  cp.n_company AS [textb],

    concat('https://google.com/', cp.n_company) AS [_LinkFor_textb]

    FROM Orion.Nodes N

    INNER JOIN  orion.NodesCustomProperties cp on cp.nodeid = N.NodeID

  • This is a great little tip! Glad I found it. Here's what I did to linkify email addresses in a custom widget. (The ComponentID is irrelevant to any of you...it's simply the specific application monitor component that pulls the email address of whoever is on call for each team here.)

    SELECT ComponentName AS Team, ComponentMessage AS Contact, CONCAT('<a href="mailto:',Contact,' "/a>',Contact) AS [_LinkFor_Contact] 
    FROM Orion.APM.ComponentAlert
    WHERE ComponentID Between 133364 AND 133367

    In the custom resource, I ticked the check box to 'Allow HTML tags' in the column's value.