Sharing Lists Between Models

Is there a way to share lists between models? We use a number of different models all for the same company which uses the same structure - and it would be really handy if it were possible create a 'shared' master list(s) in one model that could be referenced by all the other models.

Best Answers

  • @NicolasCadier

    @DmitrySorokin

    @LipChean_Soh

    The following is a technique to remove items now not included in the master list.

    This assumes that the master list itself (or those included in the import) only contains the current items, and anything not included should be deleted in the target

    Take the following example:

    We have a product master module (probably in a hub)

    2019-01-03_13-18-04.png

    P3 already existed in the target product list (now deleted from the master list) and let's assume we have already updated the Product list for the new "P6"

    2019-01-03_13-21-23.png

     You will see there are two additional line items.  'Current?' is the flag we import from the Master module and 'Delete?' shows if that product is not included in the new master list

    So, when we import the properties of the product via the import we use one of the import settings (not widely used)2019-01-03_13-20-01.png 

    This will remove the properties for P3 and toggle the delete flag to TRUE

    2019-01-03_13-22-55.png

    You then set up a 'delete from list using selection' action using Delete? as the flag

    Assuming you want all of this done automatically you should put the actions into a process:

    1. Import to the list

    2. Import the properties (as above)

    3. Delete from list

    You can always have 3 as a separate action if you want to manually check before running the delete.

     

    This process is also useful for the Master lists itself.  Ideally add a separate property in the source file/import

     

    I hope this helps

    David

  • Excellent!!

Answers

  • Hi Nicolas,

     

    You can send lists from 1 model to another model, but i would strongly suggest that you consider building a Data Hub.

     

    Please refer to the link below:

    https://community.anaplan.com/t5/Knowledge/Building-a-Data-Hub/ta-p/33593

     

    For your purpose, you can just look at item 2, i.e. "Import your data files into the data hub", but i would encourage you to read the entire document.

     

    Thanks,

    LipChean

  • Hi NicolasCadier

     

    It is not possible to reference lists between the models, you have to import them to each model via actions.

     

    A good way to export lists from a model (data hub model for example) is to first create a module (hierarchy management module), where you have line item for each list you are planning to export. Each line item is formated as the list you have in mind. Once that is done, you can create a view for each list and then create an action in other models to import from that view. It is a better way, because in views you can turn off the summary level (or top level), which is not possible when you import from the list directly. In this way, when import action is run, you will have all green checks, which gives a lot of comfort that all data is imported succesfullly. 

     

    Hope it helps,

    Dmitry

  • Hi LipChean,

     

    Thanks for the response, that's an interesting article.

     

    My issue with this approach however is that using an import method I don't see how it's possible to delete items from the master list.

     

    If you have any suggestions on this would be appreciated!

     

    Thanks,

     

    Nic

  • Hi Dmitry,

    As with LipChean's method, this is a one way management system (as far as I can tell). Whilst this will allow me to push new organisation items out to my other models - it won't allow me to remove units, unless you know a way to do this? Perhaps a delete by selection?
  • Hi NicolasCadier,

     

    If you are trying to delete items in Model B with the selection stored in Model A, then you could import the boolean line item into model B first and then use 'delete using selection' to clear list items in Model B. Is that what you are trying? 

     

    There is no way you can delete items in model B from any action located in model A. The only way is to go to model B and delete items from there. 

     

     

     

    Dmitry

  • Thanks David, 

     

    I definitely learned from your post. 

     

    Dmitry

  • Thanks David, I tried this method and it works nicely!

  • @DavidSmith - the approach suggested works well if it's a small list.

     

    In case its a huge list running in to number of 100k items then the availability and performance of the model will be impacted.

  • @nebisht 

     

    As with any techniques using a data hub, you do need to be mindful of the imports to the target models; these should be scheduled "out of hours" whenever possible and the imports should use the minimal amount of data to improved the speed of the import itself.

     

    However, the technique will not adversely affect performance as the list size increases per se.  Yes, the more you are deleting, the longer it will take, but that does not mean the technique should not be used.  In fact that it is the most optimal way of updating the list in the target.

    Deleting and reloading the whole list each time when there are common members is bad practice and will cause more issues than the technique described

    All of the Best Practice and advise we post on forums and our other articles on community are based on months of research using a wide variety of models and data structures, and use our internal labs to accurately analyse the effect of different techniques

    Cheers

    David

  • My intent was only to suggest alternative approach importing only the delta items. Capturing the deletes in source model in a say "archive" list, which would be used to 'delete using selection' in the target model.
    This will send through only delta i.e. new creates/modified/deletes in the import action and keep the processing of the model optimized.