Convert list to text

amanda_myton
Super Contributor

Convert list to text

Is there a function to change a list value to a text? I want to use the & operator with list values, but it only accepts text. When I try just using the list-formatted line items, I get the error below, so it seems that if I could convert the list selection into text then I'd be fine: The 'text1' argument for the '&' function should have datatype of TEXT not LIST:ILT Offerings:text1 & text2

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisMullen
Community Boss

RE: Convert list to text

Hi Amanda, Have you tried using the NAME Function? https://community.anaplan.com/anapedia/calculation-functions/name This should allow you to switch the value from List to Text. -Chris

View solution in original post

4 REPLIES 4
ChrisMullen
Community Boss

RE: Convert list to text

Hi Amanda, Have you tried using the NAME Function? https://community.anaplan.com/anapedia/calculation-functions/name This should allow you to switch the value from List to Text. -Chris

View solution in original post

Chmacpherson
Occasional Contributor

Re: RE: Convert list to text

Hello,

 

Question

I am trying to retrieve the display name from a numbered list and then convert it to text (i.e., keep my new line item as a Text Field).

 

Do you, or does anyone, know how to accomplish this?

 

Additional Context

  • My numbered list is comprised of employee IDs
  • The Display names are the actual employee names. This is what I need appearing in a module where I am creating a text field.

Many thanks,

Chad

rob_marshall
Moderator

Re: RE: Convert list to text

@Chmacpherson 

 

Question, why are you wanting a text field when Text is less performant than a list formatted line item?  Based on what you are stating, the Display Name is list formatted (which is the correct way of doing this) and I assume it is linked to an Employee Flat list of some kind.  If that is the case, I would also assume the Employee Flat Display Name is text formatted.  So, the formula would be:

 

employee Flat.Display Name[lookup: this list.Display Name] where "this list" is the list with a display name that is list formatted.

 

But again, try to stay away from Text.

 

Hope this helps,

 

Rob

Chmacpherson
Occasional Contributor

Re: RE: Convert list to text

Hey Rob,

 

Thank you for your speedy reply and apologies for my delay.

 

You raise a great point. I was heading down an unrealistic path, so this point helped me reframe what the issue was and approach it from a different angle.

 

Many thanks,

Chad