title: Ionic3 Action Sheet with Variable Inputs
body: <p>I need to create an action sheet or some other kind of alert which displays options to a user and saves the option they clicked in a variable. However, the options displayed to the user need to be retrieved from Firestore and are different for each user (each user also may have a different number of options). </p>
  
  <p>I’ve been able to display these options in an action sheet, but I’m struggling to get the value of the option they clicked.</p>
  
  <p>Below is my code for the function so far. The list of options retrieved from Firestore is saved in an array called ‘options’.</p>
  
  <pre><code> categorizeProblem(){
    this.action = this.actionCtrl.create({
     title: "What sort of problem did this student have?",
    })
  
    this.options.forEach(option =&gt; {
    var button = {
      text: option,
      value: //option name
      handler: (data)=&gt; {
        //Need to get the value/name of the option clicked and save this in a variable
      }
    }
    this.action.addButton(button);
  })
  
  this.action.present();
  </code></pre>
  
  <p>}</p>
  
  <p>I would really appreciate if someone could help me with this or suggest an alternate way to do this.</p>
  
  <p>Thanks in advance!</p>