cancel
Showing results for 
Search instead for 
Did you mean: 

How to access GET-parameters in portal url

dhorions
Contributor
0 Kudos

Is it possible to access GET-parameters in a bsp application in an iview in the enterprise portal, and if so, how do I do it?

If you look at the url of this post (/message/1514719#1514719 [original link is broken])

I would like to have the value of "forumID" in the bsp application in the iview with shortlink "thread".

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Dries,

It is possible to access GET parameters in BSP applications,passed from corresponding iViews from Portal.

In the BSP iViews,in the property Application Parameters,we can specify the parameters with corresponding values to be passd to the BSP application.

the parameter values can be static as well as dynamic.

Say,we want to pass a static value,do_id and the dynamic value,the user id of the User logged into EP.Then in the iView property Application parameters we can specify this as:<b>

do_id=DO00000001&userid=<User.UserID>

</b>

This can be retrived in the corresponding BSP page when the page is initialized,in onCreate event as:

<b>
User = runtime->server->request->get_form_field( 'userid' ).
DO = runtime->server->request->get_form_field( 'do_id' ).

</b>

where User and DO are the page attributes.

Hope this helps,

Regards,

Siddhartha

dhorions
Contributor
0 Kudos

Siddhartha,

I can see how this would work for the userid, but I don't want to pass the userid, I want to pass a GET-Parameter from the url in the address-bar, the url that was used to open the portal, with a shortlink and a parameter.

Does anyone perhaps know where I can find detailed documentation about the ApplicationParameter-property of iview?

athavanraja
Active Contributor
0 Kudos

you can use <Request.[ParameterName]>

search SDN for the following document titled

"How to…

Use the Application Integrator

ENTERPRISE PORTAL 6.0" its explained there.

Regards

Raja

dhorions
Contributor
0 Kudos

Raja,

your solution is what I was initially looking for, so thank you.

Can you also supply a link to the article you refer to? I can't find it:-)

But while looking for this I found something even better, a way to pass parameters to an iview without having to define them in the iview ApplicationParameter-property.

Apparently the trick is to add the parameter "DynamicParameter" to the url, that translates to different parameters in your bsp application(iview).

So if you want your bsp application to have the parameters "roomid=555&date=01.01.2007" your url should be

http://bla/irj/portal/rooms?DynamicParameter=roomid%3D555%26date%3d01.01.2007

where %3D is the ascii representation of "=" and %26 is the ascii representation of &.

I found this here : /message/529588#529588 [original link is broken] , but in this thread they say to separate the parameters by a ";", whereas for me it only works when i use %26 (&).

Message was edited by: Dries Horions

athavanraja
Active Contributor
0 Kudos

i also couldnt find the link. drop me a mail (my mail id is available in my business card) i will send you the document.

Regards

Raja

athavanraja
Active Contributor
0 Kudos

sorry for the delay. today i have mailed you the document.

Regards

Raja

Answers (1)

Answers (1)

athavanraja
Active Contributor
0 Kudos

what sort of iview is it?

let me understand the question. you have a iview which is showing a BSP application. (a bsp iview or url iview) and within the BSP application you want to read the values passed via iview url (GET) (application parameter).

is my understanding right? if yes

within the BSP application you can either have page attribute with the same name as parameter name with auto check box check or use request->get_form_field to read the values.

Regards

Raja