Module Line item is text and want to feed it to a list, formatted as list

Highlighted
Previous Contributor

Module Line item is text and want to feed it to a list, formatted as list

Hello, new to Anaplan. I have a line on a module called " Physical Location State".  It's an IF Statement looking at field in my file that indicates whether a person worked from home or not (NOT BOOLEAN, but looking at a text value).  If the person has work from home in the field, I use the home state, else work state.  Since the IF Statement is looking at a text field for infomation, I had to format this line item as text. However, I want to feed this item as part of my Employee List as a property and I want that property to be formatted according to my States List.  HELP!  How do I get it to refernce a text field but format that list item property as a list?  Advice? Thank you.

3 REPLIES 3
Highlighted
Previous Contributor

RE: Module Line item is text and want to feed it to a list, formatted as li

Carolyn You may be able to use the FINDITEM( list , text ) function to convert text into list formatting. This function allows you to find a text value within a list and return the list formatted equivalent. Example: 1) Ensure you have a 'States' list 2) Create a new module of Employee and the following line items, setup in blueprint as: [th]Line Item [/th] [th]Formula [/th] [th]Format [/th] [th]Description [/th]
Location Text Stores the 'home' or 'office' field from your file
Home State Text Stores the State in which the employee lives
Office State Text Stores the State in which the employee works
State as text IF Location = "Home" THEN Home State ELSE Office State Text Performs the IF statement, returning 'Home State' or 'Office State' depending on the 'Location'
State as list FINDITEM(States, State as text) List (State) Finds 'State as text' within the States list and returns as a list formatted entry
State all in one FINDITEM(States, IF Location = "Home" THEN Home State ELSE Office State) List (State) Combines the functions in 'State as text' and 'State as list' into one line item
This approach works for line items and properties, so once you're happy that this does what you need, you can setup Text or List properties on Employee List and reuse the functions. Images below show: a) Line Items in blueprint b) Line Items in pivot c) Properties on 'Employee' list HTH Duncan .
Highlighted
Previous Contributor

RE: Module Line item is text and want to feed it to a list, formatted as li

Duncan, Thank you so much for your help.  I think I am almost there.  I do have a states list but what was interesting is that the code there is US-NJ,etc. and not just th 2 digit state code.  So I first had to do a concatenation in one line item and the in another line item do the FINDITEM to my States list to get the full State Name.  Hooray!  Now my module has the State as list formatted. Question--how do I feed that directly into my employee list?  Do I have to manually upload it or can I do a lookup of some sort from the module to employee list?  As crazy as it sounds, I have 1 data source that populates who the employees are and another data source that tells me where they live.  I was hoping to upload the list from the one data source and then auto-feed this module to the list.  Ideas? I tried a look up on employee id which is in both the module & the list & that did not work.  Ideas?
Highlighted
Previous Contributor

RE: Module Line item is text and want to feed it to a list, formatted as li

Carolyn If your States list follows the International Organization for Standardization (ISO) coding ISO 3166-2, then they will take the form "US-zz". However, you should be able to use the more user-friendly 2-character "zz" form utilizing the States list's Code property: - Each item within a list can be assigned a Code, provided that it is unique across that list. This works fine for States, as there is only one "AL" etc. - These may be manually entered (or copy-pasted in) on the Grid View tab (see image 1). This should take minimal administrative effort since new States are an infrequent addition! - Alternatively, if the States list is maintained via an import, a field may be added and mapped to the Code property - Functions which reference States will treat the item and code similarly, returning the expected result whether you use either "US-zz" or "zz" notation (see image 2) If your model is new (i.e. minimal impact to users) you may choose to switch item and code around - using "zz" as the item and "US-zz" as the code property. This may be favourable, as the item name is more commonly seen by users. Note: the item format is treated as "list" whereas the code format is treated as "text". To answer your question, you may be able to populate the Employee list property from the module (see image 3): 1) Create a property on the Employee list 2) Enter a formula for this property in the Properties tab      a) If the property is list formatted and line item is list formatted, use module.'line item'      b) If the property is text formatted and line item is list formatted, use NAME(module.'line item') Alternately, you may want to setup the whole thing as Employee properties rather than using a module - this depends on whether you want users to see/interact with the data. Note: if the module has more dimensions than simply Employee, the formula may need to change. HTH Duncan .