title: Set default value for parameter in Lightswitch
body: <p>I am trying to set a default value for a multi-valued parameter in Lightswitch but am having no luck.</p>
  
  <p>For an example, I have a hardware inventory. "Hardware" table has fields of ('active', bool) and ('company_id',int).
  Company_id is a foreign key to a Company table which contains a list of companies to select from. </p>
  
  <p>I want to filter my Lightswitch screen based on these two field, but when the screen first loads I want it to default to the primary company, for active hardware.</p>
  
  <p>I have created the Local Property for my 'active' parameter, added it to the screen.
  Setting up the dropdown list for company parameter requires:</p>
  
  <ul>
  <li>Add Data Item (as a Query, selecting the table from my datasource, named Companies)</li>
  <li>Add Data Item (as Local Property of type Companies, named SelectedCompany)</li>
  <li>Binding query parameter to SelectedCompanies.company_id property</li>
  <li>Adding SelectedCompanies to the screen</li>
  </ul>
  
  <p>I then specified the default values as such in code:</p>
  
  <pre><code>partial void Screen1_Created()
      {
          // Write your code here.
          SelectedCompanies.company_id = 2;
          selected_active_property = true;
      }
  </code></pre>
  
  <p>This works just fine for the 'active' parameter which is Boolean, however the SelectedCompanies line gives an intellisense error of:</p>
  
  <blockquote>
    <p>Property or indexer "LightswitchApplication.company.company_id" cannot be assigned to -- it is read only</p>
  </blockquote>
  
  <p>Has anyone gotten a default value for this type of parameter working before?</p>