Skip to main content
dionh66546374
Participant
December 18, 2017
Answered

How to copy an array to the clipboard

  • December 18, 2017
  • 1 reply
  • 503 views

I have an array of information I have collected from radio buttons. I need to know when they chose No to a certain question. Right now I have an app alert displaying the no's for the user. Now I need to copy that information into a Word/Excel document. I need to know the code to copy the array to the clipboard. Also, I named my radio buttons 1, 2, 3 etc. Here is my current code. I'm not sure where the copy code would go:

var questions = [

'Question 1: Do you smoke?',

'Question 2: Do you drink?']

//I had 69 questions total that I added to the above array

// the number of radio buttons you have in the pdf

var question = 79;

//question starts at checkbox 5. I made the mistake of taking out questions so my radio button started at 5.

var counter = 5;

var myArray = [];

var arraycounter = 0;

for (; counter < question; counter++) {

if (getField(counter).value=="No") {

myArray[arraycounter] = questions[counter-5];

//variable for question string

arraycounter ++;

}

}

app.alert('These questions were answered no: \n'+ myArray.join("\n"),3);

This topic has been closed for replies.
Correct answer dionh66546374

Nevermind, I just figured out you can Control-Copy an alert box. Please disregard the question.

1 reply

dionh66546374
dionh66546374AuthorCorrect answer
Participant
December 18, 2017

Nevermind, I just figured out you can Control-Copy an alert box. Please disregard the question.