Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving one record before another?
Message
From
11/04/1998 11:20:22
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00091247
Message ID:
00091314
Views:
20
>>How can I change the order of records in a non-indexed table so as to move one record before another.
>>
>>Here's the scenario: When entering step-by-step instructions on a Shop Order (to tell employees the order in which a job should be done), sometimes, you want to go back and add a new step between two existing steps, or after a certain step, or before a certain step. The records are collected in a grid, where a command button on the form does an append, then passes focus to the new record in the grid. How can I allow for re-ordering, without having a field in the table that stores the sequence number?
>>
>>I need a mover or something.
>
>Matt, if you need just insert the records, you could use INSERT BLANK [BEFORE],
>but your table must be opened EXCLUSIVE, which may not be convenient. What is the reason not to use indexing?
>
>Nick

Actually, the child table is index by the child-key 'Job_num', but there is no field called 'step_num' so you have to enter the steps in the right order. If you need to go back and add one between say the 4th and 5th step, there really is no way.

I need to create a 'step_num', that goes like 10, 20, 30, etc. Then if you need to add one, you could make it like 25, then when refreshed, the records would appear in order.

I just wanted to avoid the 'step_num' field, but I guess I can't. It seems like even a mover control still would need this field to pull it off.

Any ideas?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform