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.
Re: Error when updating hierarchies with list items
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?
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.
Thank you for this solution. I'm trying to use this logic but I have an extra layer that I would like to review.
I have a System Module in my Data Hub Model where I am bringing in all Hierarchy levels as well as Boolean Line Items for the Subsets I would like to build in my list.
My System module is built off of a Full Account Flat List. I've created a line item for the AU Number from that. This AU Number shows up multiple times due to the different Accounts it is associated with. I then have Boolean Line Items to select based on the Accounts.
I'm trying to build a list for the AU and have Subsets that should be populated from the Boolean Line Items in the System Module. But because the List gets populated based on the first occurrence of that AU, the Boolean for the subsets are not getting populated correctly.
What additional logic could be added to resolve this issue?
Here is a screenshot:
System Module: As you can see the Salary and Other Expense are Account lines for the same department. The Printing Boolean is only selected for the Printing Account. But because Salary is the first occurrence, the Printing Boolean is not getting populated when I create the list subset.
Ok, yes, yours is a bit more complex, but still very doable. Is that 750 (the AU number) a list or text formatted? If it is not a list, I would create a flat list in your data hub of just the first occurrences of that AU Number and then create a line item that is formatted as AU Flat (so a Finditem(AU Flat, AU Number) - name the line item AU Flat List) in that module (the one you were showing, the transactional module).
Then, you can create a SYS module based off the newly created list (AU Flat) for the subsets formatted as Boolean. For for each of the new subset line items, you can use the following formulas: