It's all about the answers!

Ask a question

How to pass condition value to a query prompt through the URL?


Mike Shkolnik (9809161143) | asked Jan 14 '15, 9:20 p.m.
I created a query that prompts for Filed Against by selecting "Enable input of condition values when query is run" for Filed Against when configuring the query. I would like to be able to pass a selected value via the URL. For example, here is the URL for the query:

https://SERVER:PORT/ccm/web/projects/PROJECTNAME#action=com.ibm.team.workitem.runSavedQuery&id=_hEzooJxaEeS7jLn4ZWIpUA

Can I add something to the end of this with "&" to tell it the value I want for Filed Against so it won't prompt and will just run the query with that value?

Comments
Donald Nong commented Jan 14 '15, 11:39 p.m.

What is the reason behind this? It seems that you want to achieve something semi-dynamic, but I can't be sure. When RTC retrieves the query definition, it looks for an attribute "hasParameters". If it is true, I believe it will prompt for the parameters. If you have two parameters and you can somehow pass one in the URL, do you want RTC to prompt for the second one? There is another problem - you may not know the parameter name unless you do some debugging. For example, if I set "Created By" as a conditional filter (parameter), I get a parameter name "created91". :-)


Mike Shkolnik commented Jan 15 '15, 12:20 p.m.

I want to create a "menu" (html) that links a single query to each team's results by clicking on their team name. Thus I need to pass the parameter as part of the URL. The parameter will have a different value for Filed Against for each team. This should be possible.


Robert Davis commented Jun 10 '15, 10:21 p.m. | edited Jun 10 '15, 10:28 p.m.

 I would like to do the same thing  and more with the functionality you are asking about but I have not found any way of doing it outside of an API via Java (and truthfully don't know Java so I'm out on that one.

Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.