Formula to get code of a parent



What formula can be used to get the code of a parent list inside a flat module? 


for example in this particular module the parent is a numbered list and I want to bring its code in the 'Code' line item( Text Format). What method can I adopt to achieve the same?




  • Hi,
    You can just use CODE() formula. So if you store parent item in "Parent" line item, it will be "CODE(Parent)". If "Parent" line item has TEXT, format, then firstly use FINDITEM() forumula.
  • Hi @Shawnm,

    I assume your parent column is either list formatted manual selection(or import) or Text formatted manual write(or import).

    In the case of List formatted manual selection(or import) you can use the formula Code().

    To find the parent code is not allowed if your parent item is text formatted. This is because your numbered list have only one way of unification, that is by code. so, Finditem() will not help you to get code, it will give you blank in cells although your formula would be correct.

    I am not a fan of numbered list, I would avoid having parents as numbered list. If your parent is having repeated names then its better to concatenate and bring the list as unified. 

    if you have parents as numbered list then your selective access if applied will show some random numbers(instead of display name) and you cannot use finditem() to bring the code if your parent is text formatted in any module.