0

Open a custom URL in Ninox

Hi,

Is it possible to open a concatenated string url upon clicking the URL button of the URL element.

I have a url element that has a value "scan.Polygon.com" in it. I also have the 'Transaction Hash' in another text box. What I want to achieve is that if the 'Transaction Hash' is not empty, then I want to open the url "https://www.polygonscan.com/<transactionhash>" when I click on the URL button in the URL element.

2 replies

null
    • Fred
    • 7 days ago
    • Reported - view

    The URL field takes you to whatever URL is entered. If you want to modify the URL then you will need to use a button.

    One method is to convert the URL into an array based on periods. Then grab the last two items of the array, which would be the domain name then rebuild the URL then use openURL() to launch the newly formed URL.

    Something like this just gets you the domain:

    let b := split(URL, ".");
    let c := item(b, count(b) - 2) + "." + item(b, count(b) - 1);
    c

    Then your button could look like:

    let b := split(URL, ".");
    let c := item(b, count(b) - 2) + "." + item(b, count(b) - 1);
    openURL("https://www." + c +"/[your text here]")
    • Database App Developer
    • vermau81
    • 2 days ago
    • Reported - view

    Thanks for the solution Fred. I will try out this solution.