# Link with parameters

**URL:** <https://community.thunkable.com/t/link-with-parameters/1168129>\
**Category:** Questions about Thunkable X\
**Created:** [March 15, 2021, 12:03pm UTC](https://community.thunkable.com/t/link-with-parameters/1168129 "2021-03-15T12:03:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmurachpx](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tmurachpx](https://community.thunkable.com/u/tmurachpx)\
**Post date:** [March 15, 2021, 12:03pm UTC](https://community.thunkable.com/t/link-with-parameters/1168129/1 "2021-03-15T12:03:32Z")

</div>

Hey Guys,  
I have a problem with the “open Link” block.  
The Url I want to open is somewhat variable. It is created with the “join” block from a fixed url Part and a variable part that enters an article number in our shop. Looks like this:

“[https://www.sampleshop.com/search?sSearch=](https://www.sampleshop.com/search?sSearch=)” + “productnumber123”

When I alert it, the Url is created correct. But when I click on the link in the app the behavior is strange. Most of the time 2 tabs in the browser are opened. One with only [https://www.sampleshop.com/](https://www.sampleshop.com/) and in the background one with the correct url.  
Sometimes only the base url is opened…

Any ideas?!  
I tried storing the complete url in a variable and handing it to the “open link” block. But that did not help…

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 15, 2021, 12:12pm UTC](https://community.thunkable.com/t/link-with-parameters/1168129/2 "2021-03-15T12:12:52Z")

</div>

Does your URL string contains spaces?  
The `open link` will not process spaces in the URL and will not resolve incomplete URLs even if it is just a missing “http”.

---

<div class="post-metadata">

**Author:** ![tmurachpx](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tmurachpx](https://community.thunkable.com/u/tmurachpx)\
**Post date:** [March 15, 2021, 12:31pm UTC](https://community.thunkable.com/t/link-with-parameters/1168129/3 "2021-03-15T12:31:21Z")

</div>

nope, no spaces.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 15, 2021, 3:18pm UTC](https://community.thunkable.com/t/link-with-parameters/1168129/4 "2021-03-15T15:18:43Z")

</div>

I agree that there could be a special character causing an issue. If you’re able to share the actual URL, that would be helpful. If not, try using the “join” block in the text drawer to add something like a bullet (•) to either side of the URL block you are using. Then display the value in a label and check to make sure it’s what you expect it to be such as:

```auto
•https://www.sampleshop.com/search?sSearch=productnumber123•

```

This is going to be really hard to troubleshoot without seeing your blocks and/or the actual URL, though.

---

<div class="post-metadata">

**Author:** ![tmurachpx](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tmurachpx](https://community.thunkable.com/u/tmurachpx)\
**Post date:** [March 15, 2021, 3:49pm UTC](https://community.thunkable.com/t/link-with-parameters/1168129/5 "2021-03-15T15:49:15Z")

</div>

Sure I can share the url:

“[https://w-ww.radicalracing.de/search?sSearch=RR.004.12-BK](https://w-ww.radicalracing.de/search?sSearch=RR.004.12-BK)”

I use the Join Block to connect the static part “[https://w-ww.radicalracing.de/search?sSearch=](https://w-ww.radicalracing.de/search?sSearch=)” with a variable which contains the product number.

(Note: I added the - in www to prevent the “preview” of this page to show the page instead of the url)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 15, 2021, 6:46pm UTC](https://community.thunkable.com/t/link-with-parameters/1168129/6 "2021-03-15T18:46:21Z")

</div>

When I try opening that link in Thunkable Live on iOS or Android, it just loads the page as I’d expect. Do you want to share the project link or screenshots of your blocks? There may be something you’re doing that’s affecting the display of that page.

---

<div class="post-metadata">

**Author:** ![tmurachpx](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tmurachpx](https://community.thunkable.com/u/tmurachpx)\
**Post date:** [March 16, 2021, 11:21am UTC](https://community.thunkable.com/t/link-with-parameters/1168129/7 "2021-03-16T11:21:26Z")

</div>

I can share the blocks here:

 ![Bildschirmfoto 2021-03-16 um 12.14.10](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/d/4db9d954091a5a8ed420f0df959a01a92d65d767.png)

The function is called when the page loads.  
It calls an api which returns an object containing an article number.

Thanks in advance for your help!

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 16, 2021, 5:09pm UTC](https://community.thunkable.com/t/link-with-parameters/1168129/8 "2021-03-16T17:09:25Z")

</div>

And just to be clear, if you set a label’s text to the variable shopLink inside of the “when label-Shop-Link Click” block and remove the open link block, you get exactly this?

[https://w-ww.radicalracing.de/search?sSearch=RR.004.12-BK](https://w-ww.radicalracing.de/search?sSearch=RR.004.12-BK) (without the dash between w-ww, and without any leading or trailing spaces)

And if so, what happens if you disable the API section of blocks and just try a simple test of “when label-Shop-Link Click” → open Link [https://w-ww.radicalracing.de/search?sSearch=RR.004.12-BK](https://w-ww.radicalracing.de/search?sSearch=RR.004.12-BK) ???

---

<div class="post-metadata">

**Author:** ![tmurachpx](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tmurachpx](https://community.thunkable.com/u/tmurachpx)\
**Post date:** [March 18, 2021, 10:05am UTC](https://community.thunkable.com/t/link-with-parameters/1168129/9 "2021-03-18T10:05:14Z")

</div>

Ok, so this behaves strange!  
I did what you said and removed the “Open Link” block. Then I added “change text of label to the link variable”.  
It DID change the text of the label to the correct link. BUT it also opened the link in the browser xD.  
So now I did the following. Which does what I wanted to do in the first place. But I don’t think it should behave that way. Just tested it in live view on android. Will test on ios too.

 ![Bildschirmfoto 2021-03-18 um 11.01.28](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/8/a88f400a8c73370d682ed4b8ef007deae0d5ddc7.png)

Note: The second block just changes the text of the label back, so when the user gets back in the app, he does not see al log url…

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 18, 2021, 3:21pm UTC](https://community.thunkable.com/t/link-with-parameters/1168129/10 "2021-03-18T15:21:18Z")

</div>

If you disabled/deleted the Open Link block and it still opened a browser on the device then you have a second Open Link block somewhere. Have you tried zooming all the way out on the Blocks tab screen to make sure you don’t have stray code?

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:25pm UTC](https://community.thunkable.com/t/link-with-parameters/1168129/11 "2024-11-08T13:25:59Z")

</div>


