3420
Views
6
Comments
How to get URL query string parameters
Question

Hello ,

How to get URL query string parameters?



Thank you


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

Hi Viktoria,

If you mean the parameters sent in the URL of a Screen, then make sure you have Input Parameters with the same name, they'll be automatically captured. You can't easily capture random parameters though, but why would you want to?

UserImage.jpg
Viktoria Yosupova

Hi Kilian,


Thank you for yor answer. I wanted to get url params for my Layout. And I think because of it block and not page I can't do it...

2016-04-22 00-29-45
Nuno Reis
 
MVP

The official way is with parameters like Kilian said.

https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Navigation/Pass_Data_Between_Screens_With_Input_Parameters

If the URL includes unknown fields, the only way is with GetBookmarkableURL and finding them in the full string.

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

Hi Viktoria,

Blocks aren't seperate pages, they are rendered inside a page, so they don't have a seperate URL with parameters. In general you shouldn't need the Screen's Parameters inside a Web Block that's on the Screen. Anything the Web Block needs should be passed via the Web Block's Input Parameters.

2018-06-15 00-21-10
Pedro Vila Nova

Hi Viktoria Yosupova,

You are not giving us much information, including if it is a mobile or web application. 

Please, be more specific, so we can help you find a solution for your post. 


What you mean with : " I wanted to get url params for my Layout" ?


Best Regards,
Pedro Vila Nova

2020-03-24 00-01-07
Nuno Gonçalo Pereira

when you enter in some URL, you can use the getEntryURL() function of the "HTTPRequestHandler" library , and get, by searching, the input values through the use of built-in string_Split() function of "Text" library, passing the value "&" in the delimiters so that you have the different input values separated by "&" character.

Best Regards,

Nuno Pereira

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