947
Views
7
Comments
Solved
Make dynamic link to external website
Question

Dear all,

I am new to Outsystems, so still a lot to learn. I am looking for a solution to this problem: 

I want to make a clickable icon which redirects to an external weblink. The variable must be linked to the "getfundbyId.List.Current.Fund".


An example of the external link is this:

https://api.fundinfo.com/3.0/document?apiKey=f47b210a-1e9a-49a6-b9bf-69e7dfa31c80&shareclass=IE00B3D07S45&documenttype=PR&country=CH&language=EN

In this link you see a number starting with IE. This should be replaced by the "getfundbyId.List.Current.Fund", and of course open in a new tab.


Is this possible?

Thank you!

Erwin

2020-07-29 19-08-40
Sanjay Kumar Sahu
Solution

Hello Ervin,


Plz find below snaps for complete process :

Step1. Right click on the icon and select Link to-> RedirectToUrl

Step2:

Link property : 

Step3:

Double click on URL property and write like this :

Step4: 

Change to open link in new tab:

Done. Cheers!


Sanjay

2020-07-29 19-08-40
Sanjay Kumar Sahu

Hello Ervin,


Yes, it is possible and very simple to implement. You just need to write your static URL in string format and add dynamic data in expression. Like this :

"https://api.fundinfo.com/3.0/document?apiKey=f47b210a-1e9a-49a6-b9bf-69e7dfa31c80&shareclass=IE"    + getfundbyId.List.Current.Fund  +  "&documenttype=PR&country=CH&language=EN"


Let me know if it helps!


Sanjay

2023-03-16 16-29-51
Paulo Rosário

Hello Erwin ,

If i understand correctly you need to replace the number starting with IE with your variable. 

You can do this by creating the URL on the link itself.

Something like : 

"https://api.fundinfo.com/3.0/document?"+yourApiKey+"&shareclass="+getfundbyId.List.Current.Fund +"&documenttype=PR&country=CH&language=EN "

I'm assuming that there are some "static" parts to the link.

This solution can create some overhead on your loading, depending on the length of your list, so keep that in mind.

To make the link open in a new tab you must simply add the "target _blank" extended property on the link. 

Please refer to this post : https://www.outsystems.com/forums/discussion/33138/open-page-in-new-tab-window-when-you-click-the-link/


Hope it helps :) 

Happy coding ! 

Paulo Rosário 

2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi Ervin,

In addition to Sanjay's comment, attaching a sample application .oml file

See this sample app (Click the Dynamic URL column link - It will redirect you to the Google Search page with pre-filled search value)


Hope this helps you!


Kind regards,

Benjith Sam

ReactiveDynamicURL.oml
2020-07-29 19-08-40
Sanjay Kumar Sahu
Solution

Hello Ervin,


Plz find below snaps for complete process :

Step1. Right click on the icon and select Link to-> RedirectToUrl

Step2:

Link property : 

Step3:

Double click on URL property and write like this :

Step4: 

Change to open link in new tab:

Done. Cheers!


Sanjay

UserImage.jpg
Erwin van Hal

Hi all,


you guys are HERO's! :) Thak you for your quick solution, it works! Now I am afraid I will spam you more often with questions :)


Thanks!

Erwin

2023-03-16 16-29-51
Paulo Rosário

Erwin van Hal wrote:

Hi all,


you guys are HERO's! :) Thak you for your quick solution, it works! Now I am afraid I will spam you more often with questions :)


Thanks!

Erwin

 

 Haha, anytime Erwin , don't worry about it ! ;D

2020-07-29 19-08-40
Sanjay Kumar Sahu

Erwin van Hal wrote:

Hi all,


you guys are HERO's! :) Thak you for your quick solution, it works! Now I am afraid I will spam you more often with questions :)


Thanks!

Erwin

 Good to hear! Could you plz mark as solution to the most helpful post, It is a good practice and will be helpful for other member..


Thanks,

 Sanjay

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.