Retrieving the GET Parameter in a customized URL

Posted by Rollbase User on 13-Dec-2012 05:45

I would just like to know how can I retrieve a GET value in a customized URL in Appxys. For example, in URL given below: https://www.xxxxx.appxys.com/prod1/servlet/Template?hint=file&objDefId=661021&templateId=8414342&id=2084166&sessionId=0&yr=2012 Here I concatenated yr to the systems generated URL in creating document template. My question would be, how can I get the "yr" value, which is 2012, or are there any possible way of getting the value of my "yr"? Thanks in advance.

All Replies

Posted by Admin on 13-Dec-2012 11:42

What type of template you're using - JavaScript?

Posted by Admin on 13-Dec-2012 11:49

Please try rbv_api.getHTTPParameter(name) server-side API.

Posted by Admin on 13-Dec-2012 20:08

Thank you Sir for the reply.

BTW, I'm using document template, not javascript.

Posted by Admin on 13-Dec-2012 20:11

And actually, the "yr" that I'm trying to get here is not a field in any of my object.

Posted by Admin on 17-Dec-2012 00:26

I would just like to follow up my inquiry regarding the said matter.



Again, I'm currently using document template, neither javascript nor HTML template, to generate views of our reports. Also, the "yr" existing in the customized URL is not a field in any of our object. I tried using rbv_api.getHTTPParameter() function but I believe it only uses the registered field in any object as its parameter.

Posted by Admin on 17-Dec-2012 12:06

You can use EVAL[] block to use JavaScript in HTML template. However I don't think it will pick up HTTP parameter. At this moment I don't have solution for this.

Posted by Admin on 22-Dec-2012 19:30

Hi Jomar,



Currently, how are you setting the "yr" parameter to be appended to your URL?

Is there a way for your application to read the parameter before sending it?



- You might want to try saving the "yr" parameter on the user object and then using it's token inside of the document template



- Create the year field (year), then a formula field (year_f) to house it containing:

rbv_api.getFieldValue('USER','{!#CURR_USER.id}','year');



- Use the new token inside of the template {!#CURR_USER.year_f}



Hope this helps.

If you could provide more info on this it would be easier to give more suggestions :)

Piscoso, Martin

Rollbase

This thread is closed