title: remove selected items from google form dropdown list
body: <p>I have been trying to get this to work for a couple of days now and I give up.</p>
  
  <p>I want to create a Google form with a drop down list populated form a spreadsheet. I don't what anyone to choose the same as any one else. (like in a potluck situation)</p>
  
  <p>example:  </p>
  
  <ul>
  <li>I am giving away :<br>
  <ul>
  <li>a comb  </li>
  <li>a brush  </li>
  <li>a bowl full of mush</li>
  </ul></li>
  </ul>
  
  <p>I tell Thomas, Richard and Henry that they can each have one and send them a link to a Google form I created. Tom is quick and opens the form 1st. He enters his name and chooses a comb out of a three item drop down list. Dick opens the form link and in the same drop down question he chooses out of the two remaining items. He chooses the brush. Harry is a bit of a slow poke, so when he gets home he opens my link, but alas, he can only have a bowl full of mush.</p>
  
  <p><strong>How can I get this done?</strong><br>
  Based on my research so far I will be needing to use the if function on the responses spread sheet to see if there has been a take for an item (see if the cell is vacant) and maybe VLOOKUP, but I can't get a clear picture of how to make it all work together.<br>
  Thank you,<br>
  Good night</p>
  
  <p>EDIT:
  Based on gssi's answer, I wanted to post the code and describe the way I did it.</p>
  
  <pre class="lang-js prettyprint-override"><code>function updateListChoices(item){
    var inventory = (SpreadsheetApp.openById(theIdOfTheResponceSpreadsheet)
                .getSheetByName("inventory")
                .getDataRange()
                .getValues());
    var selected = (SpreadsheetApp.openById("0Al-3LXunCqgodHB5RGNpR0RyQ0pERmVnek1JeUJKS0E")
                .getSheetByName("responses")
                .getDataRange()
                .getValues());
  
    var choices = [];
    var selectedReal = [];
    for (var i = 0; i&lt; selected.length; i+=1){
   selectedReal.push(selected[i][2]) }
    for (var i = 1; i&lt; inventory.length; i+=1){
      if(selectedReal.indexOf(inventory[i][0])=== -1){
        choices.push(item.createChoice(inventory[i][0]));}
    }
    item.setChoices(choices);
  }
  
  var LIST_DATA = [{title:"the title of the question", sheet:"inventory"}]
  function updateLists() {
    var form = FormApp.getActiveForm();
    var items = form.getItems();
    for (var i = 0; i &lt; items.length; i += 1){
      for (var j = 0; j &lt; LIST_DATA.length; j+=1) {
        var item = items[i]
        if (item.getIndex() === 1){
          updateListChoices(item.asListItem(), "inventory");
          break;
        }
      }
    }
  }
  </code></pre>
  
  <p>In the building of the form, click the <code>tools</code> menu, then click <code>script editor</code>. Copy the code from here (with changes to fit your needs) to the script editor and hit save. Click the <code>Resources</code> menu and hit the <code>project triggers</code> (the 1st option). Click <code>Add trigger</code>. Choose <code>updateLists</code> <code>from form</code> do this once with when sending and once when opening (you should end up with 2 lines.)   </p>
  
  <p>It isn't very elegant, but this is what I am capable of. Good Luck.</p>