Conflicting Calculation Results

I have the following code that merges a few fields. The field ‘accessories’ stores values that are entered vis a checkbox, where the issue seemd to be.

In the screenshot I have a form displayed as a list, with the calculation field (Text Area), print sliding set to grow.

As you can see the values are not wrapping correctly.

Any Ideas?

Erich

the code might even help:

return manufacturer +’ ‘+ model +’ ‘+‘SN:’+ serial_number +’ ‘+ ‘[’+ condition +’]‘+’ '+ ‘{’+ accessories + ‘}’;

If you use a checkbox, Servoy delimits the values by a special character (I tink its \n, but I am not sure - search the forum for that). So what you could do is to take your checkbox field contents, turn that into an array and convert the array to a nice looking string. The code could look like (if \n is the character):

var myArray = accessories.split('\n'); // creates an array if the values are delmited by "\n"
var myAccessories = myArray.join(', '); // produces a string with your values seperated by ", "

Is this what you are looking for?

Thanks,

I don’t understand why I am getting different results if I select the same check boxes (Look at the 2 records above the last one in the screen shot).

Anyway, I will do what you suggested.

Thanks Again