Hi @Connor55 ,
Could you please show more details about the error message within your "Submit" button?
Have you defined a proper Primary Key within your SQL Table ('[dbo].[Pipeline]')?
Firstly, please make sure you have defined proper Primary Key within your SQL Table. It is known limits with SQL Server connector in PowerApps, please check the following article for more details:
https://docs.microsoft.com/en-us/connectors/sql/#known-issues-and-limitations
If you want to use a Edit form to edit the selected item within the Gallery, I think it is not necessary to initialize a variable to store the selected item in your Gallery. Please take a try with the following workaround:
Set the Items property of the Gallery to following:
'[dbo].[Pipeline]'
Set the DataSource property of the Edit form to following:
'[dbo].[Pipeline]'
set the Item property of the Edit form to following:
Gallery.Selected
Please take a try with above solution, check if the issue is solved.
Also please check if you have defined some Required fields in your SQL Table, if so, please make sure you have enabled them within your Edit form, and provide proper values for these Required fields.
In addition, you could also consider submit the form data back to your SQL Table using Patch function instead of SubmitForm function. Set the OnSelect property of the "Submit" button to following:
Patch(
'[dbo].[Pipeline]',
Gallery1.Selected,
Form1.Updates
)
or
Patch(
'[dbo].[Pipeline]',
LookUp('[dbo].[Pipeline]', 'Primary Key Column' = Gallery1.Selected.'Primary Key Column'),
Form1.Updates
)
Please consider take a try with above solution, then check if the issue is solved.
Best regards,