最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Using Patch in PowerApps to push data to a SQL table gives error - Stack Overflow

programmeradmin2浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论