1 Reply Latest reply on Dec 18, 2017 9:14 AM by dionh66546374

    How to copy an array to the clipboard

    dionh66546374 Level 1

      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);