cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Meneghino
Level 10

Bug report: cannot remove a record from Azure SQL DB when primary key includes a datetime column

I have a table where the primary key is composed of two columns:

1. An nchar(9) column

2. A datetime column

 

When I display the table in a gallery and try:

Remove('[dbo].[Changelog]', {Changed_item:Gallery1.Selected.Changed_item, Change_time_UTC:Gallery1.Selected.Change_time_UTC})

Nothing happens but no error is thrown.  It is particularly worrying that no error is thrown, since the record is not deleted.

 

Using this:

RemoveIf('[dbo].[Changelog]', Changed_item = Gallery1.Selected.Changed_item, Change_time_UTC = Gallery1.Selected.Change_time_UTC)

At least gives the error: "The specified record was not found"

 

No work-around seems possible.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Bug report: cannot remove a record from Azure SQL DB when primary key includes a datetime column

Hi @Meneghino,

 

Thanks for reporting this.

Under the auto-generated App, with the composite key configured Azure SQL table, the delete icon under details screen is unable to delete the record, showing no errors.

Creating a button and change the formula with removeif function, it would show the following error message:

11.PNG

For further testing, it seems this issue is related with the datetime type.

Once the Datetime type has been configured to Primary key, the remove would not work and the RemoveIf function would return the error mentioned.

Defining the Primary key with other data type ( int, or string) would have the remove function work as expected.

I will forward this, and if I have any helpful information received, will post back.

Thanks again.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Bug report: cannot remove a record from Azure SQL DB when primary key includes a datetime column

Hi @Meneghino,

 

Thanks for reporting this.

Under the auto-generated App, with the composite key configured Azure SQL table, the delete icon under details screen is unable to delete the record, showing no errors.

Creating a button and change the formula with removeif function, it would show the following error message:

11.PNG

For further testing, it seems this issue is related with the datetime type.

Once the Datetime type has been configured to Primary key, the remove would not work and the RemoveIf function would return the error mentioned.

Defining the Primary key with other data type ( int, or string) would have the remove function work as expected.

I will forward this, and if I have any helpful information received, will post back.

Thanks again.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,435)