Parse a URL QueryString for specific key

Parse a URL QueryString for specific key

  
Hi - I need to get values from the querystring.  I looked through the HTTPRequestHandler and can't seem to find a function already defined.  Or am I just overlooking something?

In C#, I would use something like this: Requst.QueryString["key"].  I was hoping that this extension would provide me this functionality. 

Thank you
Hi David,

I think you miss the GetFormValue action of the HTTPRequestHandler ("Gets the value of a form field of the current HTTP request.")

Recieves the name of parameter, returns the value.

Best regards,
Mário Coelho
Thanks Mário.  I tried that as well but all i got was a blank value; or undefined in the debugger view.

Update: I ended up creating my own extension action to get the key/value pair. 
It's good to hear!

I forgot to say that for querystring that method only works on Preparation.
 
It's also possible to do it client-side, for example with this jQuery plugin http://plugins.jquery.com/url/ plugin but it requires much more work and java scrip tricks.

Best regards,
Mário Coelho
Hi,

Why didn't you just add a input on the screen with that name and let the platform do it for you? Does the key change?

Regards,
João Rosado
Hi João - The link is embedded in an email and it contains a unique key.  I need to grab that key to verify the user from the email.  There are no input fields for these querystring parameters.
not sure what the problem is exactly.


1. users will click the link in the email right?
2. so, the link will go to something like http://<outsystemserver>/Espace/Link.aspx?key=6736hdsf
(or jsf if it's javastack)
3. this means, if you have a page named "Link" in your espace, and with inputparameter key of type text, it will get filled properly
so not sure why it doesn't work in your case.

Thank you Statler - I didn't try putting an input field on the form.  Sounds like it could work. 

Update: Statler, that worked perfectly.  I added the Key as an input parameter to the page and the field was populated exactly like I wanted.  Thank you for the suggestion.
Hehe that was what I tried to explain.
Sometimes solutions are so simple that they look too good to be true. ;)

Nice that you got it working.

Regards,
João Rosado
How can I get query String parameter on the page?

I have tried putting input field.

Please help
Brajesh -

Add an Input parameter to the page with the name of the parameter.

J.Ja
J. wrote:
not sure what the problem is exactly.


1. users will click the link in the email right?
2. so, the link will go to something like http://<outsystemserver>/Espace/Link.aspx?key=6736hdsf
(or jsf if it's javastack)
3. this means, if you have a page named "Link" in your espace, and with inputparameter key of type text, it will get filled properly
so not sure why it doesn't work in your case.
 
 Have you solved this issue?