convert list to string
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 58
- Joined: Sat Jun 15, 2019 10:09 am
convert list to string
Hi there (me again)
This really is straight forward, but its late and I'm stumped??!! so any help appreciated.
I have a list field where you can select more than one line (containing names),
if I put the selected text from the field into a variable and put it, I can see that each entry is on a separate line (understandably),
but I need these names as a string; name1, name2, name3, etc... because I need to use them in a POST request.
Could you tell me the best way to do this?
Kind regards
Paul
This really is straight forward, but its late and I'm stumped??!! so any help appreciated.
I have a list field where you can select more than one line (containing names),
if I put the selected text from the field into a variable and put it, I can see that each entry is on a separate line (understandably),
but I need these names as a string; name1, name2, name3, etc... because I need to use them in a POST request.
Could you tell me the best way to do this?
Kind regards
Paul
-
- VIP Livecode Opensource Backer
- Posts: 10049
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: convert list to string
To turn this:
...into this:
...use:
Code: Select all
Bob
Carol
Ted
Alice
Code: Select all
Bob,Carol,Ted,Alice
Code: Select all
replace cr with comma in tList
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: convert list to string
Yep, this is not SPARTA, but Livecode!

Re: convert list to string
You know Ted and Alice are not together any more, don't you? They split a few months ago, and he started seeing Caitlin recently. Alice got a new job and moved away, I think.
Re: convert list to string
OK, OK, my posting was a bit off the track, but at least I mentioned Livecode! 

Re: convert list to string
Oops yes, this should have been in the gossip forum 
Luckily I didn't mention Kaveh

Luckily I didn't mention Kaveh

-
- Posts: 58
- Joined: Sat Jun 15, 2019 10:09 am
Re: convert list to string
thanks v much as ever
kind regards
Paul
kind regards
Paul