Omit bug?

Hi,

I’m seeing a strange behaviour related to OMIT command.
If I perform a search and then I issued the omit command, everything works fine unless I try to omit the last record of the foundset: in that case, I get a java.lang.NullPointerException and the foundset doesn’t respond anymore (I have to give a loadAll or perform another search).

Can anyone confirm this?

Servoy 313, OSX.4.8, Java 1.5

Hi Riccardino,

I couldn’t reproduce your omit problem. If the problem persists, please create a case in our support system, preferably with a small solution demonstrating the problem attached.

Tested on

OS X 10.4.6
Servoy 3.1.3-build 407
Java version 1.5.0_07-87 (Max OS X)

Hi Riccardo,

We have had some problems because of the changes in 3.1, since databaseManager.getDataSetByQuery() is limited to 1,000 records, we started using controller.loadRecords(sql,args).

This has side-effects. The form remembers this query, and if you try changing the foundset by adding records which are not found by the query they will ‘disappear’. I suspect there are similar issues with hiding records.

If you are using controller.loadRecords(sql,args) on the form, try adding a

controller.loadRecords(foundset.unrelate())

before you hide and see if the problem goes away.

swingman:
If you are using controller.loadRecords(sql,args) on the form, try adding a

controller.loadRecords(foundset.unrelate())

before you hide and see if the problem goes away.

Ciao, Chris.

Unfortunately the problem persists.
My method is a simple:

var formattivo = ""
if (arguments[0]!= null || arguments[0]!= "")
{
formattivo = arguments[0]
}
else
{
formattivo =  forms.main.elements.tabs_main.getSelectedTabFormName();
}
forms[formattivo].controller.omitRecord();

It works fine except when used with the last record of the fset (even with very small foundsets).

I think Servoy doesn’t handle Omits quite right anymore, in 3.1.

I posted something to that effect

changes to omit function - Classic Servoy - Servoy Community

but haven’t heard back. Then again, it’s Friday night already.

I tried a workaround, wherein among other things I stuffed the foundset into an array, but it seems to be limited to 1000 records. Bummer. What if the user needs to omit one record out of more than a thousand? It actually happens that way sometimes.

And here’s another thing about Omits: try doing an omit in a search with a (!). It’s fine if you have just one request, but load up more than one request, and the whole thing is toast.

jim:
And here’s another thing about Omits: try doing an omit in a search with a (!). It’s fine if you have just one request, but load up more than one request, and the whole thing is toast.

Jim,

Can you show this in an example?

Rob

jim:
I think Servoy doesn’t handle Omits quite right anymore, in 3.1.

I posted something to that effect

changes to omit function - Classic Servoy - Servoy Community

but haven’t heard back. Then again, it’s Friday night already.

See my reply http://forum.servoy.com/viewtopic.php?p=39377#39377

Rob