I have an EDIT screen with an EDIT form and a GALLERY at the bottom which brings back corresponding record(s) from a SQL database ('[shp].[MOBProductPO]_1'). The toggle within the gallery will be the only editable item wihtin the GALLERY. If the user swithes the toggle I need to be able to write back that value to the SQL Database.
So far the Submit button creates a Collection (POEdit) which holds the toggle values for each record in the gallery.
What is the syntax to write those values back to their corresponding records within the SQL database? I can not figure out how to tell PowerApps which record.
Do you want to update records in PowerApps to SQL?
I suggest you use the combination of gallery and edit form.
1)Set the gallery's Items: tablename
2)inset an "add" button
3)set the "add" button's OnSelect: NewForm(Form1)
4)Set the edit form's data source: tablename
5)Set the submitform's OnSelect: SubmitForm(Form1)
Then, if you click the "add"button, the form will be an empty form, you could enter data in it.Cilck the submit button, you will create a new record to SQL.
If you click the arrow button inside tha gallery , the form will load the item's data that you select.You could edit the data. Click the submit button, you will update the record that you select to SQL.