Showing results for 
Search instead for 
Did you mean: 

Set multiple values in a web template via JavaScript

Former Member
0 Kudos


I have a web template displaying a query containing a mandatory variable. Multiple values are allowed for the variable.

By manually inserting a link in the template I succeeded in setting a single value for the variable with JavaScript, but how is it possible to pass multiple values for that variable?

So far my link target looks like this:



How do I have to modify the line?



Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thank both of you for your replies!

I already consulted the WebAPI, that's where I got the way to set a single value for a variable from. But it doesn't tell me how to set multiple values (not ranges).

The Query Monitor is indeed a good feature, I didn't know about it before. In this case, however, I tried to identically construct the URL without success. Most of the parameters are simply ignored.

Did no one ever set multiple values for a variable manually?

Former Member
0 Kudos

Jost -

I haven't tried this yet...but I suspect it could work. In the below example, I have a variable on Company Code and am setting it equal to 3 different values. Give it a shot.

















Former Member
0 Kudos

Thank you, David, it works!

There is a slightly simpler way:








Still I wonder how many values I can assign, i.e. how long can a URL be?

Kind regards,


Answers (2)

Answers (2)

Product and Topic Expert
Product and Topic Expert
0 Kudos
Former Member
0 Kudos

One of the easiest ways to figure out the URL to be generated is to go to transaction rsrt and it will show you the URLs that are built after the variable screen inputs. Hope this helps.