Error while saving new record from NG Grid

Forum to discuss the new web client version of Servoy.

Error while saving new record from NG Grid

Postby dev-ws-011 » Mon Jun 03, 2019 12:40 pm

Hi,

I am working on NG Client and creating UI which is utilizing Servoy NG-Grids -> DataGrid in multiple forms.

I have successfully mapped required fields in DataGrid and it displays my data as required.

When I create new record(using in line edit mode by setting columns of grid to edit type "TextField", or whatever type is required), while filling data in grid, I get error:
"ERROR com.servoy.j2db.util.Debug - Cannot set foundset record (Coffee;.null;_2) dataprovider 'description' to value 'Matte . Record not found."

on console. If I try to save this record, new record is created but description column is set to null.

Any assistance in resolving above will be highly appreciated.

Thanks
Servoy Developer
dev-ws-011
 
Posts: 18
Joined: Fri Oct 21, 2016 8:23 am

Re: Error while saving new record from NG Grid

Postby Andrei Costescu » Tue Jun 04, 2019 8:28 am

If you have a sample solution to reproduce this please create a case either in Servoy JIRA or on the aggrid component's github repository's issue tracker. Attach to that the sample solution and the full stack trace from the logs - if available. And mention there the Servoy and Datagrid versions as well.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 951
Joined: Tue Jun 26, 2007 3:14 pm

Re: Error while saving new record from NG Grid

Postby dev-ws-011 » Mon Jun 10, 2019 9:50 am

Hi,

I am working on NG Client and creating UI which is utilizing Servoy NG-Grids -> DataGrid in multiple forms.

I have successfully mapped required fields in DataGrid and it displays my data as required.

When I create new record(using in line edit mode by setting columns of grid to edit type "TextField", or whatever type is required), while filling data in grid, I get error:
"ERROR com.servoy.j2db.util.Debug - Cannot set foundset record (Coffee;.null;_2) dataprovider 'description' to value 'Matte . Record not found."

on console. If I try to save this record, new record is created but description column is set to null.

Any assistance in resolving above will be highly appreciated.

Thanks

In addition to above mentioned details, please note this error appears when using Oracle DB. However, postgresql DB is working OK.

Using following versions:
Servoy version: 2019.3.0.3412
Servoy NG Grids version: 2.0.2 (Latest)
Servoy NG Grid Services version: 1.0.1 (Latest)
Servoy Developer
dev-ws-011
 
Posts: 18
Joined: Fri Oct 21, 2016 8:23 am

Re: Error while saving new record from NG Grid

Postby dev-ws-011 » Mon Jun 10, 2019 2:12 pm

Andrei Costescu wrote:If you have a sample solution to reproduce this please create a case either in Servoy JIRA or on the aggrid component's github repository's issue tracker. Attach to that the sample solution and the full stack trace from the logs - if available. And mention there the Servoy and Datagrid versions as well.


Hi Andrie,

As suggested, submitted a ticket for above mentioned issue with bug description, sample solution, and some screenshots.
Ticket number is [SVY-13815].

Thanks
Servoy Developer
dev-ws-011
 
Posts: 18
Joined: Fri Oct 21, 2016 8:23 am

Re: Error while saving new record from NG Grid

Postby Gabi Boros » Tue Jun 11, 2019 9:37 am

Hi

The problem here is that you're changing the pk. When you create a new record, the pk is null, and aggrid gets a rowid for the new record generated based on
that null, and because there is a new row, aggrid rebuild all the view. Then you change the pk, but that is only a row update, that won't trigger the aggrid view
rebuild, so, aggrid will still use the rowid generated based on the null pk, and that causes the problem, that the row with the changed pk can't be found.
A solution to the problem is to not allow pk changing, so add a pk, maybe an auto enter type, and don't allow that to be changeable in the aggrid.
Gabi Boros
Servoy
Gabi Boros
 
Posts: 344
Joined: Tue Jun 26, 2007 4:03 pm
Location: Timisoara, Romania

Re: Error while saving new record from NG Grid

Postby dev-ws-011 » Tue Jun 11, 2019 2:25 pm

Thanks Gabi Boros
:)

Can you please guide for this issue:
viewtopic.php?f=69&t=22490
Servoy Developer
dev-ws-011
 
Posts: 18
Joined: Fri Oct 21, 2016 8:23 am


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 0 guests

cron