Expand my Community achievements bar.

Selecting multiple checkboxes...Please Help!!!

Avatar

Level 4

I am having an issue I have multiple checkboxes - once the checkboxes are selected, I would like some information to appear in a field and if checkbox is deselected I would like the text to disappear.

My major problem is if all the checkboxes are selected at one time and the information appears in the textbox only one line of text will appear at once and I would also like for text to appear on separate lines and not on the same line.

This is what I am working with now:

if

(RadioButtonList4.rawValue == true)

TextField.rawValue

= "This is a value set using a script.";

else

TextField1.rawValue

= "";

Please Help

1 Reply

Avatar

Level 2

I don't have time to check, but you may want to try something like this:

If (TextField.rawValue == "") { \\check to see if field is empty

     TextField.RawValue = "This is a value set using a script."; \\set textfield to scripted string

}

else { \\if not empty, have the field be the existing data + newline + string wishing to add

TextField.rawValue = TextField.rawValue + \n + "This is a value set using a script.";

}

I forget the exact newline character, but you get the idea.