title: How can I insert selected Listbox items as a new record in to a common data service table
body: <p>I have a PowerApps canvas App and I have a requirement of creating new records for all selected listbox items in to a table. I am acually trying to implement a many to many relationship scenario</p>
  <p>my Listbox name is: ListBox1 and my table name is ContactsTable inside the page I have put a button and on click of button I put the following PowerApps logic:</p>
  <pre><code>ForAll(
      ListBox1.SelectedItems,
      Patch(
          ContactsTable,
          Defaults(ContactsTable),
          { EmpID: 2, Name: ListBox1.Selected.Name }));
  </code></pre>
  <p>it creates the last selected item repeated based on the number of items i select from listbox
  any Idea would be great.</p>