I have a SQL Table defined like this:
CREATE TABLE [powrapps].[tbl_Amenity](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Title] [nvarchar](255) NOT NULL,
[PropertyId] [int] NOT NULL,
[Active] [bit] NOT NULL,
[Created] [datetime] NULL,
[CreatedBy] [nvarchar](255) NULL,
[Modified] [datetime] NULL,
[ModifiedBy] [nvarchar](255) NULL,
CONSTRAINT [PK_tbl_Amenity] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
I am trying to insert a new record into that table with the following code:
Patch(
'powrapps.tbl_Amenity',
Defaults( 'powrapps.tbl_Amenity' ),
{
PropertyId: 39,
Title: "Testing 123",
Active: 0,
Created: Now(),
CreatedBy: gblAppData.User.Email,
Modified: Now(),
ModifiedBy: gblAppData.User.Email
}
)
That is throwing the following error:

The error makes no sense. I have also tried specifying the Id column as Blank(). Same result. It looks like the Patch() statement is trying to perform an update, based on the error. I also tried specifying an actual Id number but get the error:

This makes sense for what I tried to do.
I have seen older posts that this is not supported. Please say it isn't so! I really do NOT want to use stored procedures, they are a PITA to use. This is possible with EditForms, but don't like them either. Should Patch() work?
Thank you.