How to iterate over search results?
![](http://jazz.net/_images/myphoto/001b620e4f79c0f5a1eec02dea22c27f.jpg)
How can we do that?
Using a simple starting query such as this:
I can see from the RAM Web Client, that I have 63 results.
How can I iterate through the returned seach results?
In essence, I'd like to be able to do something like this:
Using a simple starting query such as this:
<ram:search server="ramServer" id="environmentResults" query="type:(Environment)" />
I can see from the RAM Web Client, that I have 63 results.
How can I iterate through the returned seach results?
In essence, I'd like to be able to do something like this:
<ram:search server="ramServer" id="environmentResults" query="type:(Environment)" />
<for list="environmentResults" param="environment">
<sequential>
<echo>Env Name: ${environment.name}</echo>
</sequential>
</for>
One answer
![](http://jazz.net/_images/myphoto/001b620e4f79c0f5a1eec02dea22c27f.jpg)
How can we do that?
Using a simple starting query such as this:
<ram:search server="ramServer" id="environmentResults" query="type:(Environment)" />
I can see from the RAM Web Client, that I have 63 results.
How can I iterate through the returned seach results?
In essence, I'd like to be able to do something like this:
<ram:search server="ramServer" id="environmentResults" query="type:(Environment)" />
<for list="environmentResults" param="environment">
<sequential>
<echo>Env Name: ${environment.name}</echo>
</sequential>
</for>
<ram:search> was originally conceived as something to put inside another element (e.g. <ram:submit>). There's currently no way to iterate over the result. I opened an enhancement: https://jazz.net/jazz02/resource/itemName/com.ibm.team.workitem.WorkItem/64258