AllanK | 2022-08-30 07:44:19 UTC | #1
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 : https://developer.genesys.cloud/forum/t/dynamically-build-a-prompt-collection/5121)
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.
Jerome.Saint-Marc | 2022-08-30 12:05:05 UTC | #2
Hello,
Using a comma (',') as separator, you could use: strPromptCollection=Split(strPrompts, ",")
Regards,
AllanK | 2022-08-30 12:05:51 UTC | #3
:smiley:
Thanks Jerome.
Worked a treat.
system | 2022-09-30 12:06:24 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 16066