Create Collection from CSV list within a datatable cell

Hi,

We've got some configuration around audio that is held in a datatable to allow the support team to make quick changes to some elements. In this case, references to prompts to play in a sequential list (which later get resolved with FindPrompt function).
(reference this post : Dynamically Build a prompt Collection)

Due to the nature of one of the pieces of data (that could have an unknown number of multiple elements), I've specced it out to have a list of strings inside a single cell.

E.g.
The 2nd column has a field called Prompt. For places where multiple prompts are required I've input them into the table as a list. I've tried using a comma ',' and '\n'.

Using the datatable lookup block I assign that to a string variable. strPrompts

I then try to break that out into a collection
strPromptCollection= MakeList(ToString(strPrompts))

I've tried that with and without the ToString function.

In all cases Architect is picking it up as a single string..

I have an alternative design in mind, but it's a bit cumbersome, so I'm hoping someone might have an idea ..

(And yes I understand if we fed it with a JSON , this would be much easier to do - but I don't have that option)

Anyway - very interested to hear if someone has been able to make this work.

Hello,

Using a comma (',') as separator, you could use:
strPromptCollection=Split(strPrompts, ",")

Regards,

1 Like

:smiley:

Thanks Jerome.

Worked a treat.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.