Allow user to reorder steps in instruction database

grendell2099

Registered User.
Local time
Yesterday, 23:10
Joined
Aug 9, 2006
Messages
29
Hi all. I am planning a new project and am hoping to get some help with some of
the functionality I am struggling with. Thanks in advance for your input...

THE PROJECT: Organizing task instructions for various "stations".
There are a number of stations where tasks are performed, call them A, B, C, D, etc.
Each station has a number of tasks that must be completed, call them t1, t2, t3, etc.
Each task has a number of steps involved, call them s1, s2, s3, etc.
So small snapshot might look like this:
A
--t1
----s1
----s2
--t2
----s1
--t3
----s1
B
--t1
----s1
----s2
----s3
Organizing this into tables (stations, tasks, and steps) and keeping track of it is pretty
straight forward (each record will have a unique code generated table id).
Now for the part I need help on- from time to time users will have to reorganize the tasks
performed at a given station:
A-t3 task now needs to be performed first so it becomes A-t1

or the steps perfomed in a given task:
B-t1-s3 step now needs to be performed first so it becomes B-t1-s1

In both scenarios the other tasks/ steps would need to be renumbered accordingly (the table id's
would not be affected).

In a perfect world the user would be able to look at a station/task and view all of its tasks/steps,
dragging and dropping to reorder them. Or maybe some type of "bump up/down" ability...

I would greatly appreciate any tips/ ideas on how to approach this. I am thinking along the lines
of importing the tasks/ steps into a temp table for edit, them updating the "real" table after the user
has finished. Even if this is the best approach, I am stuck on how to work with the records in the
temp tables...
 
I would suggest using a treeview to create nodes and subnodes then drag and drop the child nodes. The base you table order on the node index
 
Thanks for the quick response DCrake. I must confess I am not at all familiar with using "treeview to create nodes and subnodes". My weekend starts in 20 minutes :D ,but I will start researching this Monday.
Again, thank you for the pointer!
 
IMHO the treeview is not for the faint-hearted... wouldn't a simpler solution be to store a sequence number against each step, task etc. so re-organising them is just a matter of changing the numbers?

E.G.

If you have
Seq# Step
1 A
2 B
3 C

and you want the user to be able to change the order of the steps then just get them to change the sequence#. Then if you sort in ascending order the steps will alway be in the right sequence.

HTH

Tom
 
TKnight, your idea is how I was going to approach it... but I am intrigued by the treeview concept, so I will look into that first- figure I should learn how to implement it even if I do not use for this project.
 

Users who are viewing this thread

Back
Top Bottom