I feel like i’m close … but maybe not 
How do I get this code to add those fields together in a string?
I have values in the database … and I want it to look like this:
For example … one,two,three,four
(all combined with a coma)
This is what I have guess so far … but obviously it’s not correct (or else I wouldn’t be posting it here)
let personality = $w("#animated").value+","+$w("#confrontational").value+","+$w("#easy_going").value+","+$w("#goofy").value+","+$w("#shy").value+","+$w("#diplomatic").value+","+$w("#sneaky").value+","+$w("#happy").value+","+$w("#fashionable").value+","+$w("#athletic").value+","+$w("#adventurous").value+","+$w("#handy_man").value+","+$w("#annoying").value;
$w.onReady(function () {
$w("#membersDataset1").onReady( () => {
$w("#dataset1").setFieldValues( {
"showtype_interest":personality
$w("#dataset1").save();
} );
} );
} );
}
Hey Nayeli,
How are you?
So tell me, what exactly isn’t working? Is the concatenation not working? Or is it the save to the database? Wasn’t clear to me what problem you’re having.
Yisrael
Apparently the first problem: not enough hours in a day to WORK. lol
Ok so let me explain what I was trying to accomplish … and that will probably explain the code I made up above … lol
On a page I have checkboxes. Let’s say the value’s are:
happy
sad
angry
mad
hungry
And on another page (a dynamic page) I want to display the selected values together on one line separated by a coma, like this:
Feelings: happy,sad,hungry
But I’ve changed my code so many times, that I have no clue what i’m doing anymore lol … help?
P.S. How was the expert meetup in Israel? Did you attend? Wish I was able to go. I’m good — how are you?
Pictures of editor:


(the last picture is the default text in preview mode, it doesn’t change. I had a completely different code before this one — and all I got instead of ‘Answer’ was “Undefiend,undefined,undefined,undefined,undefined” … But I can’t remember how I wrote the previous code)
Well, I’m good. Right now working from my hometown of Pittsburgh (my profile picture) while on a visit to family. Otherwise you wouldn’t hear from me at this hour.
Anyhooo…
Seems to me that you want to build the string like this:
let personality = "" +
($w("#animated").checked) ? $w("#animated").value : "" +
($w("#confrontational").checked) ? $w("#confrontational").value : "" +
($w("#easy_going").checked) ? $w("#easy_going").value : "" +
... and so on ...
The idea is that if the checkbox is checked, then concatenate the value of the checkbox.
This assumes that the value of the checkbox has been set. That is, the value of the checkbox is not the same as the text part. I suspect that that’s the reason you were getting “undefined” for each of the values - they weren’t defined. Look at this description of the checkbox.
Another [cleaner] way way to do this would be to use the value property of the checkbox as an index into a array of strings. Then those strings would be concatenated into your personality string.
Is this what you’re looking for?
Yisrael
That makes much more sense in my head than what I was thinking!
I will try it out in the morning … I need to rest for the night 
Any chance someone call look at the other post I made today? I have a broken button on one site that isn’t broken on any other site 
We don’t usually work on Fri but I’ll try to take a look at your other post tomorrow.
Now, it’s past my bedtime…
g’nite