Hi, looking for some additional insight on creating a patch command for the OnSelect button with a SQL Server backend. Is there a simple patch command, highlighting each card (e.g. {First_Name:DataCardValue123.Text}), that I can create that uses a "ThisItem" so it does not create a new record each time?
***** Side-note / Not using any FK's in my tables. *****
Here's what I'm doing now.
For my primary table I use the following. This works perfect (I believe)...doesn't seem to work with the other tables I've added(dbo.company, dbo.contacts).
If( // Check if you are adding or editing record
EditForm_Audits_Company.Mode = FormMode.New,
Patch(
'[dbo].[audits]',
Defaults('[dbo].[audits]'),
EditForm_Audits_Company.Updates
);Navigate(BrowseGallery_Audits),
Patch(
'[dbo].[audits]',
BrowseGallery_Audits.Selected,
EditForm_Audits_Company.Updates
);Navigate(Screen_Detail_Audits_Company)
)
For the other tables this same code does not work (below).
Non-Working Code / Copy and paste from my main table (dbo.audit)
If( // Check if you are adding or editing record
EditForm_Company.Mode = FormMode.New,
Patch(
'[dbo].[company]',
Defaults('[dbo].[company]'),
EditForm_Company.Updates
);Navigate(BrowseGallery_Company),
Patch(
'[dbo].[company]',
BrowseGallery_Company.Selected,
EditForm_Company.Updates
);Navigate(Screen_Detail_Company)
)