Canbt determine what is wrong with my loop

Hi,

I have a document list called RatesInRec with each record identifier being “A”. I need to map this to another document list called RatesOutRec, with the record identifier being “S”. As a result, my loop in-array is /RatesInRec/A and my out-array is RatesOutRec/S. However, when I put the mapping under the loop, I am still not drilling down to one document under RatesOutRec. Here is the idea:

-Loop over /RatesInRecs/A (out-array = /RatesOutRecs/S)
-Branch
-Sequence (Exit on failure, only map record with specific field = 0)
-Map

With each step indented to the right beneath the step above.
I can’t figure out how to put the picture right in here… but does anything look suspicious? What I’m getting is… on the left, RatesInRecs with a single document A (which is correct) and on the right, RatesOutRecs with a list of document S. Could if have to do with having the branch and sequence between the loop an map?

Kim

Just add a map step before the loop. In the map output create a record structure RatesOutRecs with the list S in it. Then click on the blue arrow to assign a value to it and then click OK. This will not give it any value but will tell IS what structure to expect when it gets to the loop.

Rupinder

That worked! Thank you very much!

But now I have another problem

I want to only take records with a “0” in a certain field, so I used a branch with a sequence to do this, mapping it only if the value of that field is “0”. However, I end up with blank records. As a result, I get errors when I do “convert to string” since the records are null. Is there any other way to limit the records to certain criteria?

Nevermind, I figured it out! I just used the “copy only if” that field was equal to “0” when I mapped my documents to values in my convert to string service. I didn’t realize you could use that there!

Thanks!
Kim