Skip to main content
Solved

How can i recreate a link to an external page on a column in a grid?

  • 26 June 2024
  • 5 replies
  • 61 views

Hi,

The idea is the create a link to an external application. Right now this is the table we are using with 2 fields (a lot more, but those are not relevant)

external_invoice_number
external_url

The external_invoice_number is a readonly field
The external_url is a hidden field

I thought of using the Calculation Type: Expression for the external_invoice_number field to create the link, but somehow it is not working (or my code is not correct)


Why is this not working and what is the correct way to create a link? This is the code in the expression

 

​​​​​​​case when t1.external_invoice_number not null and t1.external_url not null then 
        '<a href="' + t1.external_url +'">' + t1.external_invoice_number + '</a>'
     when t1.external_invoice_number not null and t1.external_url is null then
        t1.external_invoice_number
     else
        ''
     end

 

This topic has been closed for comments

5 replies

Userlevel 1
Badge +2

Oke i managed to fix it. I forgot the is in the statement. Which is very stupid. But the result is like this:
 


How do i create a good URL? Is there a thinkwise function i should use?

Userlevel 7
Badge +23

Hi Dennis,

I can see you are reusing the text_medium domain. My guess is that the control of the domain is not set to HTML. To use HTML tags such as <a> and showing it nicely as a clickable link, you should use the HTML control. The best is probably to use a new domain with the HTML control

Userlevel 1
Badge +2

This worked!

Userlevel 2
Badge +3

Why don't you use a domain with the URL control? Then it will automatically create a clickable URL that opens in the browser.

Domains | Thinkwise Documentation (thinkwisesoftware.com)

Edit; I think you want a ‘nice’ looking URL, indeed that won't happen with the URL control because you can't set the value that you want to see (the invoice number in this example)

Userlevel 1
Badge +2

Why don't you use a domain with the URL control? Then it will automatically create a clickable URL that opens in the browser.

Domains | Thinkwise Documentation (thinkwisesoftware.com)

Edit; I think you want a ‘nice’ looking URL, indeed that won't happen with the URL control because you can't set the value that you want to see (the invoice number in this example)

I created a domain called “HTML” with the HTML control indeed. And that turned my code into a clickable nice looking link