Janne,

The main use of drag and drop in table fields is to move things between tables
rather than within a single table.  I really haven't seen use cases to drag and
drop within a single table.

To accomplish your goal, it would seem to me that the most convenient approach
would be to have two table fields, original and sorted.

Original would be the original data.
Sorted would be empty when the record is first displayed.

Then, you simply drag the items from original and drop them into sorted to put 
them
in the order you are trying to achieve.  Then, you do a table walk of the sorted
table to assign your sort order column in the order that the customer drug the
items into (and consider ordering by with gaps so like 10, 20, 30 rather than 
1,2,3
so that you can slip ones between easily if needed).

This is the main way drag and drop is used.  To order things or to select some
items from one list to include in the other (like selecting options) or 
something
similar.



Now, if you are getting the interaction you want with one table but the problem
you are encountering is the recalculation...  Have you considered the sort order
column being an editable (and not visible) column and when something is moved
(or after every x moves), you trigger workflow that does a table walk and simply
renumbers all the sort orders according to the current order of the table.  
Then,
when all done, you do a table walk and save all the new sort order settings.

Just an idea of something to consider if you have to stay within one table and 
the
drag and drop is allowing you to do the reorder you want and you are just 
getting
stuck with the sort order "renumbering".

Doug Mueller

-----Original Message-----
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Janne Olsson
Sent: Monday, June 16, 2014 7:05 AM
To: [email protected]
Subject: Drag and drop to sort within a table

Hi,
We have just upgraded from 7.6 to 8.1 and want to start using drag and drop. 
The purpose is to move requests in a list in prio order.
I have tried a few techniqes but really cant find the best way to do it. What I 
have tried is to have a hidden sortorder field, that I set with workflow. It is 
working, but the way i use it will it only allow a limited number of moves 
before all records must be recalculated. So I tried with a linked list, but not 
sure how to use it. All suggestions are welcome for how to solve this.

Cheers,
Janne  

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org "Where the Answers 
Are, and have been for 20 years"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"

Reply via email to