Using a comma in variable

Is there a way of using a comma in a variable within a sentence and not as a separator? I tried “& comma;” and “& #x2c;” so far.

To elaborate: I am storing different sentences in a variable. Some of these sentences use commas. Because commas function as separators, these sentences are split apart. Is there a way to prevent this behaviour for certain commas?

Can you please provide some screenshots of this behaviour and also explain a bit more on what you plan to achieve? I am not sure where the sentences are split apart.

I am using a few variables to store sentences and to display these sentences one after another by using “text value from select many at position”. In some of these sentences, I want to be able to use commas, which at at the moment is not possible as a comma is perceived as a separator and splits the sentence apart.

@prabhu @Tobi any chance that one of you can have a quick look at it? It’s one of the last problems that need to be solved before we can run our intervention.

My solution would involve not using “text value from select many at position” as that is intended for short welcome/goodbye messages that needs to be randomised.

I would take these individual strings (which has these commas) and then make individual messages in the respective micro-dialog. I would then use a decision point to randomise a variable (say ‘$random’) and then use the variable as a condition in each of the messages.

For example, let’s say I have three strings ‘a’, ‘b’ and ‘c’ one of which I need to randomly pick every time a micro dialog is sent. I would save them separately as individual messages. Then I will make a decision point before ‘a’, ‘b’ and ‘c’ which would compute and store ‘$random’ using “calculate value but result is always true” and “floor(random()*3)+1”. Now ‘$random’ variable has 1, 2 or 3 (randomly assigned). I will add rules ‘$random’ ‘calculate value equals’ ‘1’ for message with string ‘a’, ‘$random’ ‘calculate value equals’ ‘2’ for message with string ‘b’ and ‘$random’ ‘calculate value equals’ ‘3’ for message with string ‘c’.

1 Like