I have create a PowerApps application that once you click on the submit button, picks data from one SQL table and pushes it to another, the issue comes when pushing the data, I have used Patch()
and Collection()
functions, both facing the same issue, that is invalid arguments:
ForAll(
clientData,
Patch(
'[Invoice].[tb_Test]', // Data Source
Defaults('[Invoice].[tb_Test]'),
{
DEBTOR_NAME: ThisRecord.DEBTOR_NAME,
ADDRESS: ThisRecord.DEBTOR_ADRESS,
CONTACT: ThisRecord.BILL_TO_SITE_CONTACT_NAME,
PIN: ThisRecord.CLIENT_PIN,
LE_CODE: ThisRecord.LE_CODE,
LINE_DESCRIPTION: TextInput1.Text,
LINE_AMOUNT: Value(TextInput1_1.Text)
}
);
But when I modify the formula to:
ForAll(
clientData,
Patch(
Defaults('[Invoice].[tb_Test]'),
{
DEBTOR_NAME: ThisRecord.DEBTOR_NAME,
ADDRESS: ThisRecord.DEBTOR_ADRESS,
CONTACT: ThisRecord.BILL_TO_SITE_CONTACT_NAME,
PIN: ThisRecord.CLIENT_PIN,
LE_CODE: ThisRecord.LE_CODE,
LINE_DESCRIPTION: TextInput1.Text,
LINE_AMOUNT: Value(TextInput1_1.Text)
}
);
By removing '[Invoice].[tb_Test]
', it runs successful but no data is pushed to [Invoice].[tb_Test]
, anyone with possible solutions.