I have a EditForm with 2 datasources from SQL tables. So when I click checkmark to submit, I should update 1 row in PaymentVaucher, and as many rows in table LineItems as there are curently on form.
I have created a patch function for updateing data. But I can only submit 1 row to each tables at once.
I cant submit both rows to table LineItems at once. Why is that?
EditForm:
OnSelect value for checkmark icon, for submiting data:
DataCardValue21 and Label14 have ID values of rows.
Patch('[dbo].[PaymentVaucher]', LookUp('[dbo].[PaymentVaucher]', ID = Value(DataCardValue21.Text)),
{RequestedBy: DataCardValue29.Text,
RequesterEmail: DataCardValue30.Text,
PaymentDate: DataCardValue31.SelectedDate,
DueDate: DataCardValue32.SelectedDate,
AccountingApprovalComments: DataCardValue33.Text,
Curency: DataCardValue39.Text,
AccountingApproval: Radio1.Selected.Value
}
);
Patch('[dbo].[LineItems]', LookUp('[dbo].[LineItems]', ID = Value(Label4.Text)),
{Description: TextInput5.Text,
Quantity: Value(TextInput6.Text),
Price: Value(TextInput7.Text)
}
)