× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The problem here is that many can reorder ORDERS at the same time so you
not only need a mecanism that relativly reorders ORDERS in DB2 but also push
the result as soon as you do it to other users.


On Mon, Apr 29, 2013 at 7:22 PM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:

Leave a gap of 10 or so between
priorities to allow reordering, etc?


That would be my inclination. Except perhaps making the gap even larger
than 10. Derive the gap between rows prior to inserting a new row. Then
make the new row "priority" value 1/2 the derived gap.

Of course, after so many inserts you could reach a point where the gap
between rows was only 1. So you might have to supplement your routine with
something that reorders the whole list before being able to insert a new
row between rows.

-Nathan




----- Original Message -----
From: "Holm, Paul" <pholm@xxxxxxxxxxxxxxxxx>
To: web400@xxxxxxxxxxxx
Cc:
Sent: Monday, April 29, 2013 10:42 AM
Subject: [WEB400] Pattern to Reorder Records via Drag and Drop

Looking for insight/experience on the following:

We have many scenarios where a list of records (subfiles) are presented to
the
user. In the record that is a field that holds an INTEGER representing
"relative order" of that
record compared to the others. We are looking to create a flexible
approach that can allow reordering of the records. One specific example
is:

We have a web page that has a list of ORDERS to be processed. Each ORDER
has a PRIORITY field. Orders with the highest priority get worked on 1st.
A Priority of 99 1st then priority 88, etc. The Order Manager based on
several factors such product type, customer importance, labor schedules,
etc has the ability to change the relative ORDER that ORDERS should
be fulfilled. We are looking to enable this via JQUERY sortable. Manager
will drag the most important ORDER to the top of the list and drop it. As
a result of this, we need to change the DB2 value of the PRIORITY field to
be large than any other in the list.

What are the best practices In terms of setting up the priority field to
allow easy swapping of Priorities. Leave a gap of 10 or so between
priorities to allow reordering, etc? Big things seems to the the PRIORITY
value intervals and the methodology to swap numbers.

Thanks in advance,

Paul Holm


www.planetjavainc.com
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.