Hi, Appreciate any help on this. I have an array of names and I want to show them as a vertical list. i.e.
Name 1, Name 2, Name 3, Name 4, Name x as the output from my array, but I would like to easily show as a single text...
Name 1
Name 2
Name 3
Name 4
Name x
I have tried to use a String Replace node on the occurrence of every comma but cant find how to put in a carriage return instead ( If that would in fact work)
Regards
Peter
Hello Ventuzians!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
Array output to vertical list
Moderator: Support
Re: Array output to vertical list
try putting your string array into a string expression. Use the following as the expression:
A.Replace(", ", "\n")
A string array is converted to a string as "One, Two, Three". Note the spaces. Now we replace the comma-space ", " by a line break. Not the cleanes solition but it should work.
cheers,
rou
A.Replace(", ", "\n")
A string array is converted to a string as "One, Two, Three". Note the spaces. Now we replace the comma-space ", " by a line break. Not the cleanes solition but it should work.
cheers,
rou
Re: Array output to vertical list
Brilliant!
Thanks Rou.
Thanks Rou.
Re: Array output to vertical list
Hey Peter, Rou,
just a side note:
You do not necessarily need to use an Expression Node. You can also still use the String Replace Node. Just type the New Line in the Text Editor instead of the Property Editor by clicking on the three dots in the Replace Property. Here you can insert line breaks by simply hitting the Return Key on your keyboard. So it is not really a problem of the Replace Node, but the Property Editor.
The Property Editor is only able to edit one-line strings - therefore you cannot insert a new line in here. The Text Editor can, though.
Stephen
just a side note:
You do not necessarily need to use an Expression Node. You can also still use the String Replace Node. Just type the New Line in the Text Editor instead of the Property Editor by clicking on the three dots in the Replace Property. Here you can insert line breaks by simply hitting the Return Key on your keyboard. So it is not really a problem of the Replace Node, but the Property Editor.
The Property Editor is only able to edit one-line strings - therefore you cannot insert a new line in here. The Text Editor can, though.
Stephen