Problem with pub.list:appendToDocumentList service in IS 9.6

Hi all,
I have a problem with pub.list:appendToDocumentList service in IS 9.6 (In IS 8.2, it works normally). I use pub.list:appendToDocumentList service to add an item to my list.
Step 1: I prepare to call above service (Step 1 in attachment)
Step 2: I called above service (Step 2 in attachment)
I don’t know why ldListInfo[0] and ldListInfo[1] stay in my list, I only add ldListInfo[2] to my list (by above service). Data in ldListInfo[0] and ldListInfo[1] are input of searchLD service (They have many fields, so I don’t expand them).
Anyone know about this error :frowning: ?


Hello Cong,

So far I have understand from your screen shoot in step 2 in the highlighted portion…You are trying to do loop over
searchLDOutput/IdInfoList,but in the loop over statement you have provided idList.

If your loop condition is correct ,then I think it is showing correct response as idList is showing as document instaed of documentList.

Let me know if my understanding is correct.

Thanks
Baharul

Hi Baharul, thanks for you response.
General: In this service, I call getLDList service to get a all LDs (loan record), then I using loop to filter getLDList output and put them to searchLD output.
Detail: I want to loop over getLDListOutput/ldList (I map this list to a temp list: ldList, and loop over it). In loop, I map values to ldItem document, then I use pub.list:appendToDocumentList to put this document to searchLDOutput/ldInfoList.
Error: I only want to put ldItem document to searchLDOutput/ldInfoList, but there are two strange items putted into list. (pub.list:appendToDocumentList was called once)

This means that these entries have been in the list before adding the values/entering the loop.

Can you check that?

Remember to drop the item being added after the add-step inside the loop.
Assign the source list to the input of the add-step to make sure to add to the right list.

Another thought might be to create a temp target list for the loop and then assign this temp list to the original target list.

Awaiting your replies.

HTH,
Holger

Hi Holger, thanks for your replies,

In the attachments, I debug service and step 1 (before step out pub.list:appendToDocumentList), step 2 (after step out pub.list:appendToDocumentList).
In step 1, look at Variables view, you can see nothing in searchLDOutput/ldInfoList.
In step 2, look at Variables view, you can see three items in searchLDOutput/ldInfoList.
I don’t know why that point.

Yes, I dropped it.

I assign as Step 1 picture, and I think it right, becase I did that in IS 8.2 and it works fine.

I don’t understand exactly your idea. But I only create temp list by map, and I don’t assign it to any list.

Waiting for your replies! Thanks.

In this case we will need some more screenshots:

  • the structure of serachLDInput and searchLDOutput (at least the top level)
  • the map step before the loop
  • the content of IdList (at least the top level, where the number of entries can be determined)
  • the map step before the branch

Regards,
Holger

Hi Holger, I attach 3 screenshot for the first 3 requirement. The last requirement, I’ll attach in follow post.


ContentOfLDList.JPG
searchLDInOut.JPG

Hi Holger, I attach screenshot for the last requirement.
Thanks for your enthusiasm :).

Referring to the screenshot MapBeforeLoop.jpg:

Can you try to map the list IDList to the IDList instead of the IdInformation field?

On the other side you can directly iterate over the original list.
Adjust the mappings inside the loop accordingly

In the map step before the loop create an empty temp_IDList.
Inside the loop use this as fromList for the AddToList and remap the toList from the AddToList temp_IDList
Remember to drop IDItem, fromList and toList after this otherwise these will mess up your data if some fields are not filled in the source structure.

After the Loop add this temp_IDList to your output structure.

Regards,
Holger

Thank Holger,
I will try and respond soon.

Sorry Holger, I respond late.
Today, I decide make a dummy service and send you. And I found that with dummy service, everything work fine. When I compare them, I found a difference between outputs of getLDList service (one is real, another is dummny).
I attached two figures for demonstrate it.
IS made us hard to find root cause :(.
The last, thank for your support, Halger and people. See you in next topic (in the future) :smiley:
WrongStruct.JPG
RightStruct.JPG

That’s not enough to clear this error. I must drop all variables (except getLDListOutput) of getLDList service in the last statement. I think IS has some problems with pipeline.

Yes I agree and dropping appropriately the with in loop and list items especially when dealing with append temp item/lists will be tricky and make sure in your TUT pipeline dropping is the key the way IS handles IDATA object lists.

HTH,
RMG