what does item() and code() do in lessons 6/7?
trying to figure out what each element in CODE(ITEM('E2 Employees#')) does - i have read the documentation https://help.anaplan.com/41298b7a-e877-40e8-8cfa-8d7009d8686f-ITEM and https://help.anaplan.com/0e20099c-af47-4343-9ad9-3a20b580d2de-CODE
but still can't grasp the idea: what does item return? then what does code return from the output of item?
The ITEM() formula returns a list-formatted value that matches the format of the supplied parameter. In order to use it, the line item must Apply To the supplied parameter, and the result must be formatted as the same list.
In the example below, ITEM('P2 Products') returns a value formatted as P2 Products. Note that the highlighted values are identical.
When you look at the grid view, the result appears in the cell as the name of the list member. However, the value is NOT text-formatted, as you can see in the blueprint.
CODE(), along with related functions PARENT() and NAME(), return special properties from the supplied list member in text format.2