Copy link to clipboard
Copied
Hi everyone.
First off, I don't know if this is even possible, but if anyone can think of a way to make it work, please let me know.
So this is what I am trying to achieve:
The goal is that the user can select each of the pertinent topics, and line of text is created, and then the user can copy that text for their use.
Is this possible? If so, does anyone have any idea of how to do something like this?
Thank you,
Michael
Sure, and it's actually quite easy. Let's say you've set up all of the export values of all of the items in your check-boxes (call them Checkbox1, Checkbox2, etc.), and that you've set up a multi-line text field. You can then use this code as the custom calculation script of that text field:
event.value = this.getField("Checkbox1").value + "\n" + this.getField("Checkbox2").value + "\n" + this.getField("Checkbox3").value + "\n" + this.getField("Checkbox4").value;
And that's it. The value will autom
...Copy link to clipboard
Copied
Sure, and it's actually quite easy. Let's say you've set up all of the export values of all of the items in your check-boxes (call them Checkbox1, Checkbox2, etc.), and that you've set up a multi-line text field. You can then use this code as the custom calculation script of that text field:
event.value = this.getField("Checkbox1").value + "\n" + this.getField("Checkbox2").value + "\n" + this.getField("Checkbox3").value + "\n" + this.getField("Checkbox4").value;
And that's it. The value will automatically update when a selection is made in any of those check-boxes.
Copy link to clipboard
Copied
I had to remove the "\n" for a new line. But otherwise, this was perfect!! Thank you!
Copy link to clipboard
Copied
The "\n" is the new line... If you remove it you'll get the texts added one after another. But if it works for you, that's fine.
Copy link to clipboard
Copied
Yeah, I did " " instead of "/n" so that it would add a space between each set of values. What I was wanting was to make a paragraph based on selections, so the new line option wasn't working correctly for this. Again, thank you so much for the help!
Copy link to clipboard
Copied
That's because it's not "/n", it's "\n"...
Copy link to clipboard
Copied
And of course, the field has to be set as being Multiline for it to work (under Properties - Options)...
Copy link to clipboard
Copied
Sorry, that was a typo in my response, and I did set it to multiline. I just didn't want each new sentence from the selection to start on a new line, but tuck behind the previous line. So like I said, I modified the code to put a space between each selection. It worked exactly as I needed. Thank you.