cancel
Showing results for 
Search instead for 
Did you mean: 

Logging Repeater Information

Former Member
0 Kudos

OK, I've searched and fiddled with this long enough.

I have a repeater looping through the rows of a standard MII XML doc:

Local.xmldoc{/Rowsets/Rowset/Row}

During debugging of a process, it would be nice to be able to dump the values of the current row to the log but I can't seem to figure it out...

I can dump individual items from a repeater using an XPath Expression like:


Repeater_0.Output{/Row/*[position()=3]}

But I'd like to do:

Repeater_0.Output

Which gives me an empty

[Info]

Line.

What am I missing???

Edited by: Dennis West on Mar 5, 2009 9:42 AM

Accepted Solutions (1)

Accepted Solutions (1)

agentry_src
Active Contributor
0 Kudos

Dennis,

That has been a problem with the repeater for years. It is finally getting fixed in version 12.1. Your xPath position indexing is the best method that I have come accross. Use the Current Item property of the Repeater as your dynamic indexing value.

Something like this.

Local.xmldoc{/Rowsets/Rowset/Row[#Repeater_0.CurrentItem#]}

Good luck,

Mike

Former Member
0 Kudos

Mike,

unfortunately you are right, the segments won't display themselves.

However, your proposal

Local.xmldoc{/Rowsets/Rowset/Row[#Repeater_0.CurrentItem#]}

also does not work in my tests. I tried something like this:

Repeater_0.Output{/*/*}

which gives the value of the first node of the current item. Maybe we should involve some more XPATH?

Michael

Answers (4)

Answers (4)

Former Member
0 Kudos

It's slightly annoying to have to flow the repeater output through another action item but it works...

Former Member
0 Kudos

I did find an OK solution to this problem in version 11.5.

A work around for this problem:

After the Repeater, Add a Column Stripper (or Calculated Columns) Action Item. Use the Repeater.Output as the document source for either of these two actions. No other changes need to be made to the Stripper or Calc Action.

Then use the ColumnStripper_0.Output (or CalculatedColumns.Output) as the imput to the Tracer message.

[I did also find this version will xml save the repeater.output to a file which can then be xml loader(ed) back but why do the additional file system work...]

Good Luck

Dennis

I just wish I could give myself some points...

Former Member
0 Kudos

I have found this at least gives the values of the node Children on the Rowset/Rowset/Row Level

doublequote & stringreplace(  Local.xmldoc{string(/Rowsets/Rowset/Row[#Repeater_0.CurrentItem#])} , lf, ", ") & doublequote

It's a start... At least I can see the values.... although if anyone can also include the childrens' name... That would be great...

agentry_src
Active Contributor
0 Kudos

Hi Dennis,

Interesting solution. I would not have thought to replace the linefeeds. I was surprised when Michael told me my method would not work. I have used it before (alot) in MII version 12.0.2, but perhaps not with Tracers. I did confirm that he was correct in his statement (that it would not work).

Thanks for posting your solution. I will remember it in the future.

Mike

Edited by: Michael Appleby on Mar 5, 2009 8:12 PM

Former Member
0 Kudos

Dennis,

I also often run into this.

Try the following:

- create a local string parameter

- use an assignment action to copy the Repeater_0.Output into the string parameter

- then use the tracer with the string parameter

This will contain the output you are looking for.

Michael

Former Member
0 Kudos

>

> Try the following:

> - create a local string parameter

> - use an assignment action to copy the Repeater_0.Output into the string parameter

> - then use the tracer with the string parameter

>

> This will contain the output you are looking for.

>

> Michael

This unfortunately does not work???

agentry_src
Active Contributor
0 Kudos

I think Michael meant to copy each fields contents to the string property. You can do that and concatenate them into a list or just grab those few you are interested in.

link

Repeater_0.Output{/Row/Order} to Transaction.Order, Repeater_0.Output{/Row/Quantity} to Transaction.Quantity, etc.

The individual fields are linkable. Segments of xml were not.

Good luck,

Mike