Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RPE Report with user input to use multiple entries

 I hope I can explain.
I have a rpe report that has a user input variable for the work item id from rtc.  The field works with just one id but I am needing to put in different ids and or range of ids to pull.  
Ex.
User input- 12345, 12346, 12500-12550
And the report would show just those ids.
Using rpe 1.2.1.1 and rtc 4.0.3
Thanks in advace

0 votes



2 answers

Permanent link
 Is there a reason you are having these work item IDs entered as IDs, instead of allowing the users to directly select work items?

It may work with your design to have all the IDs entered in the same box in some consistent format, such as comma separated values.  You could then use javascript to parse them into individual values and do whatever it is you're trying to do.

0 votes

Comments

  could you provide an example on the javascript? im a newbie so please bear with me.


Permanent link

Hi Michael

You can use the below script to split those user inputs separated by a (,).

var str = "12345,12346,12500,"
do
{
var s=str.substring(0,str.search(','));  
str=str.substring(str.search(',')+parseInt("1"),str.length);       
console.log( "New value of str: "+s)
}
while (str.length!==0);

In RPE you can use RPE variables (external and internal) instead of actual variables in the script. You may have to use an Iteration Element in RPE to implement the above do while loop. The value to the variables can be controlled using assignments and a similar JavaScript like above.

Best Regards
Abish M Zachariah

0 votes

Comments

  thanks for the reply.  So i currently have an external variable called

${wi_id}
and when i publish it to RTC as a report resource, i do get the question of the variable. I put in ONE workitem and it returns the work item like it should.  Id like to be able to use that script to work with my variable so that the user can input various id's like
12354, 12346, 12340-12380

would i just replace the var str with ${wi_id}?

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 332
× 17
× 4

Question asked: Jun 11 '14, 9:16 p.m.

Question was seen: 5,454 times

Last updated: Jul 25 '14, 8:23 a.m.

Confirmation Cancel Confirm