Concatenate many text strings in one

Hello everyone,
I have a problem : I want to concatenate about 20 sentences from 20 text fields into one. So I use a “set text” action when text is changed, and in the value of the new text i put :

function () {
return document.childByName(“S Force”).content.text + document.childByName(“S Intelligence”).content.text + document.childByName(“S Agilité”).content.text (etc…)
}

image

But nothing happens, why ? Is it impossible to concatenate strings with “+” operator in the script code ?

Note: I can’t use concat() method because some fiels can be empty. And if I have to use the ‘set multipart text’ action, while every text field can be modified at any time… It will be a lot of actions !!

Any help is welcome… :slight_smile:

test code.flp (6.3 KB)

Ok, thanks Vladimir, you’re really great ! It was my event that didn’t work : the “text changed” event didn’t trigger for the “set multipart text” action. That’s good to know ! I will add a button to trigger the sum.

Thanks !!


Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.