changes to omit function

Release notes for Servoy betas

changes to omit function

Postby jim » Fri Mar 16, 2007 5:03 pm

Apparently, changes were made to the omit function in 3.1 such that records that are omitted stay omitted even after the next find:
http://forum.servoy.com/viewtopic.php?p=38971&sid=494a2df12b48a1e8fdca8ae0e7bfb752

Is there a way to work around this? And please explain why this change to omit functionality is a good thing. I find it counter-intuitive, but realize that somebody thinks otherwise, and would appreciate knowing why, and how I might use it to my advantage.

Thanks,

Jim
jim
 
Posts: 270
Joined: Mon Jul 25, 2005 3:42 pm
Location: Maine

Postby rgansevles » Mon Mar 19, 2007 7:07 pm

Jim,

The reason for the change was a problem in the find related to omit.

Both before 3.1 and now, a find does not clear the omitted list.
The problem we fixed was that before 3.1, omitted records were shown in the find result, even though they were omitted.
Omitting another record after a second find would reduce the PK list to all found except the complete omit set.

for example,
1) find returns pk1, pk2 and pk3
2) omit pk2 -> only pk1 and pk3 are shown

Before 3.1:
3) another find returns pk1, pk2 and pk3 (pk2 was omitted but is still returned)
4) omit pk3 -> only pk1 is shown, pk2 and pk3 are omitted

Since 3.1:
3) another find returns pk1 and pk3 (pk2 was omitted and is not returned)
4) omit pk3 -> only pk1 is shown, pk2 and pk3 are omitted

To clear the omit list, you can use loadAllRecords (CTRL-J).
Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Postby jim » Mon Mar 19, 2007 11:28 pm

Thank you, Rob, for the nice clear explanation! I really appreciate it.

Ctrl-J is not an option in our case, as the users of our solution have no access to menu items. I have instead prepended controller.loadAllRecords to all methods that find (list view filters, find all, export while excluding marked records, etc.). Does the job!

It does seem that it would be useful to be able to omit 'temporarily', rather than requiring loadAllRecords before every find, just to account for possible previous omittings. Hence my feature request, http://forum.servoy.com/viewtopic.php?t=7998.

Thanks again for your excellent response to my post!

Jim
jim
 
Posts: 270
Joined: Mon Jul 25, 2005 3:42 pm
Location: Maine


Return to Latest Releases

Who is online

Users browsing this forum: No registered users and 21 guests