fill code automatically


I would like to be able to add members to a list but have the code fill in automatically. is this possible?


  • @CarlosRod 

    Great question. The answer is yes, but it's not super intuitive. Here's how I achieved the same feature, you might try this or modify it to suit your need:

    • The code has to be unique, so we need a way to reliably create a new code.
    • Create a system module for the list that you will be adding and add a line item that parses the existing codes for their numeric value. So, for instance if the code is "CODE001" we want to extract the "001" and convert it to a number, in this case a one (1). 
    • Create a dimensionless module that grabs the MAX of that number.
    • When your user creates a new list item, use an action, not a form. So in this case add a line item to your dimensionless module that allows the user to create as many new items as they want. This would be an editable, numerical value. I'll call this "n". You may have to add the USER dimension on this one if you have a lot of interest in creating new items.
    • Create a list that has as the maximum number of list items a user might want to create.
    • Add a line item in that list that has a list value starting with one (1), then two (2), etc.
    • Add a line item that populates the the first "n" list items with the new codes starting with the MAX value you obtained earlier. Add the list value you created above. Concatenate any text you wish to that number to generate your code. Just make sure the numerical value of the code is easily parsed out.
    • Create a saved view that filters out all the blank list items. So if the user creates 5 new list items, then your saved view should only show five list items.
    • Use the saved view to create the new list items in your target list.

    Hope that helps!

  • @CarlosRod 

    Not sure what is in detail in your entire use case.

    However, the CODE property of an element from a list cannot be automatically filled-in. The CODE can be updated only via an import action or manually into the list. 


    The only Anaplan object that has auto-incremental functionalities is the "numbered list" type.

    When you have a combination of unique properties, Anaplan can automatically create a new item in the numbered list with its internal ID (that is not the element's Code).

    The numbered list internal id can be referenced with the function NAME(Item(#numbered list)) that returns a numeric sequence like #1, #2, #3...etc... that potentially can be used to update the CODE property. 


    If you need to generate a CODE and you need to update the CODE via an import action, having the NAME, then you can use the @JaredDolich  suggestion or you can also rely on Numbered List internal ID's...what suits you 🙂


    Hope it helps



  • Hi Carlos, 


    Yes, it is possible in the Number list


    you need to create 2 line-items 1 is Boolean formatted and 2nd one is number or text formatted 


    - In Boolean formatted, you need to check how many members you have written

    Ex:- ISNOTBLANK(Line-Item name)




    - In the number formatted Line item, you need to use the RANK function, (RANK function basically evaluates a set of values and assigns sequential rankings) 




    (I want to create in Text formatted that's why I use TEXT())



    you need to do mapping in your number list  with your module, to create an import button in Dashboard 


    Hope it will help!

    Achal Jain