Hi All,
So the gist of what I am trying to do here is get multiple values to be recorded in SQL as individual records. I am working with a table called dbo.personfood which is linked to the dbo.person table by the personid. What I am trying to do is enter the personid into a textbox and then select the different food items from a listbox but have them enter as individual records. This post got me going in the right direction, https://powerusers.microsoft.com/t5/PowerApps-Forum/Passing-Multiple-Values-from-Listbox-one-at-a-time-to-SQL/m-p/56976#M23557, but didn't completely solve my problem.
An example of what I am trying to do is if the user enters 11 for the personid in the textbox and then select chocolate, bread, and milk from the listbox the data will enter into the personfood table as:
personid fooditem
11 chocolate
11 bread
11 milk
Is there any way to do this? I know the forall statement can be used with listboxes to have each value get its own row in a SQL table but can this be used in combination with a textbox?