Skip to main content

Notifications

Power Apps - Power Apps Pro Dev & ISV
Answered

Issue Inserting Data into PostgreSQL Datasource

Posted on by 11
Hi, I'm looking to create a PowerApp using PostgreSQL as a datasource. I'm looking to try something really basic where I can add, edit, and delete data from inside PowerApps. We are already paying for a premium license and I've attempted to use the following:
 
Patch('camera_system.System',
    Defaults('camera_system.System'),
    {
        System_Components_Number: Int(txt_CompNum.Text),
        System_Name: txt_SysName.Text,
        System_Status:txt_SysStat.Text
    }
)
 
However, there is an error message 'The function 'Patch' has some invalid arguments.' but fails to point out where the issue is. Could I get some help on this? I've logged in with the super admin credentials so no read/write permissions are missing as I can retrieve a table of contents, but no luck!
 
Thanks,
Liam
  • Verified answer
    LL-07111511-0 Profile Picture
    LL-07111511-0 11 on at
    Issue Inserting Data into PostgreSQL Datasource
    A fix for this problem, was definitely a rookie mistake, but there wasn't a primary key set on PGAdmin 4. After enabling the Primary Key, there was no issue with Patching.
  • LL-07111511-0 Profile Picture
    LL-07111511-0 11 on at
    Issue Inserting Data into PostgreSQL Datasource
    Hi Sivaksk147,
     
    Thanks for replying. I've got the following error:
     
    'The function 'Patch' has some invalid arguments.'
     
    I can confirm I've been able to retrieve data:
     
    Many thanks,
    Liam
  • Sivaksk147 Profile Picture
    Sivaksk147 10 on at
    Issue Inserting Data into PostgreSQL Datasource
    can you share the what error are you getting ? 
     
    i presume you have the gateway configured and logged in with same credetails ? and able to see the see the tables from power apps application ?
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard