Error when updating hierarchies with list items

Contributor

Error when updating hierarchies with list items

I'm trying to update a list hierarchy from a module, which I have updated with an import file, and everything seems to be working just fine, that is, my list items are updated. However, since I have the same list item occurring several times in my import file, and also in the module I import from, I get the error message "Another row has already been processed with this key" and then the yellow warning triangle. 

 

Does anyone know how to avoid this? I don't want my client to think that there is an error in the import when it actually worked just fine. 

 

Thanks a lot!

Message 1 of 8
7 REPLIES 7
Community Boss

Re: Error when updating hierarchies with list items

Hi, 

 

You can create a boolean line item and use FIRSTOCCURRENCE function to identify only the distinct elements and codes to update the list. 

Create a saved view with the filter based on the boolean line item and use it as a source for updating the list. 

 

Hope it helps!

 

Message 2 of 8
Contributor

Re: Error when updating hierarchies with list items

Hi Alex,

 

Thanks a lot for your reply. However, I'm not sure if this would work for me, since I am trying to update 5 lists from one module, and as far as I understand, ISFIRSTOCCURRENCE can only be used when you have the list you want to update as dimension. Or am I wrong?

 

Thanks!

Message 3 of 8
Community Boss

Re: Error when updating hierarchies with list items

Hi
Yes, indeed firstoccurrence function works for 1 dim at the time.
This is why you will need to create a boolean and a saved view for every of 5 lists that you need to update.

Cheers
Alex
Message 4 of 8
Highlighted
Community Boss

Re: Error when updating hierarchies with list items

@fredrickstraube ,

 

Check out this training video (305 Hub Model Hierarchy Management)

 

https://learning.anaplan.com/enrol/index.php?id=419

 

Thanks,

Rob

Message 5 of 8
Contributor

Re: Error when updating hierarchies with list items

Thanks a lot for this, but it seems like an extremely complicated solution. Do you know if there is an easier way to do this?

Message 6 of 8
Community Boss

Re: Error when updating hierarchies with list items

@fredrickstraube ,

 

The IsFirstOccurrence() function works on the list within the source module, not the target list.  For example, you have a transaction module using Trans List as your list, but you want to find the first occurrence of a line item (Product) to be used in several lists downstream.  The formula would be isfirstoccurrence(Product, Trans List) which can be used as a filter for your other views.

 

Does this help?

 

Rob

Message 7 of 8
Contributor

Re: Error when updating hierarchies with list items

Hi Rob,

This is exactly what I needed and it works perfect!

Thanks a lot for your help!

Message 8 of 8