Post Closed
1389
Views
12
Comments
Solved
Unable to Open an External URL or Site
Question

Hi All,

I am aware that there are other somewhat similar posts but it seems that the solution there won't work for me. Still, I am unable to Open an External URL or Site within my Web App.

there exist a slash character "/" in between external and the URL. Even though there is really none.


I tried below recommendations but no luck on making it work.

https://www.outsystems.com/forums/discussion/26259/open-url-in-new-window-in-ios-app/


Hoping you can help with below concern.


Regards,

Mond Reyes

2024-12-19 12-19-39
Amal
 
MVP
Solution

Hello Raymond, 

I believe the value you are getting from the database is not a proper url. (must have some other prefix characters)

If the value of the url does not start with https:// or https://  the platform will prefix the hostname and application name to your value. 

Please check the database value. 

Hope this helps !!!


2024-12-19 12-19-39
Amal
 
MVP

Hi 

The solution you are referring to is for mobile app. 

For the web, just give the url as is, without prefixing it with "external:"


Regards


2026-01-15 18-30-11
Pedro Brito

Hi, usually you just need to type the fully qualified URL, like this "https://www.google.com". Preferably all in lower case.

2018-11-06 14-26-44
Suraj Borade

If you are taking the URL value from database i.e. URL is entered by users. 

Then you need to check if URL contains "https://" or not. You can do that using Index() function.

If index function returns, positive value, just pass the DB value as it is. 

If URL returns -1, then append "https://" to your URL. i.e. "https://" + DB value

You URL value should look like this :

 If(Index(URL,"https://") <> -1,URL, "https://" + URL)


Thanks and Regards,

Suraj Borade

2018-11-06 14-26-44
Suraj Borade

Also for web app, you need to add target as "_blank"

2021-03-05 13-56-11
Ricardo Pereira
 
MVP

Suraj Borade wrote:

Also for web app, you need to add target as "_blank"


Hi Suraj,


It's a good point, but it's just if he wants to open the link in a new tab.


@Raymond, if you want to follow Suraj suggestion (that it is a good one) you just need fill Extended properties like this:


Best regards,

Ricardo

2017-09-14 06-13-58
Raymond Reyes

When I tried the Extended properties "target" = "_blank", it is being opened in a new tab together with our hostname. Notice that there are 2 http or https in my screenshot below.

2017-09-14 06-13-58
Raymond Reyes

Thanks Suraj Borade, but what if I wanted to rely on the value coming from the database. Like in my sample below. It is opening as a new tab, but our OutSystems hostname is being concatenated in the front of the URL.

2024-12-19 12-19-39
Amal
 
MVP
Solution

Hello Raymond, 

I believe the value you are getting from the database is not a proper url. (must have some other prefix characters)

If the value of the url does not start with https:// or https://  the platform will prefix the hostname and application name to your value. 

Please check the database value. 

Hope this helps !!!


2021-03-05 13-56-11
Ricardo Pereira
 
MVP

Hi,

Try to debug that action and verify the string that is passed to URL. See if that string is correct or if you will need to treat that. If so, treat it and pass that value to the link URL property.


Best regards,

Ricardo

2017-09-14 06-13-58
Raymond Reyes

Thank you, I checked the value from database / REST API and it is incorrect format!

Thanks all for the help!

2021-04-09 11-42-43
assif_tiger
 
MVP

Greetings Folks,

I am referring the URL from Site Properties.
The URL is as below in Site Property :

"https://play.google.com/store"
But I am getting the URL on link as below:
OS Append URL+ https://play.google.com/store


2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Assif,

a) This topic is over a year old and b) that seems like a new question. Please, start a new topic, thanks.