× 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.



No, not stuck, Walden, in fact I'm over-analyzing <grin>.  I've already
gotten past the issue, just asking for "horizon widening" solutions.

In my mind, there are two ways to create menu files: with and without
hard-coded option numbers.  If you don't have hardcoded numbers, the
numbers are generated when you display the menu.  For larger
applications, this can be a problem, especially from a support and/or
training aspect.

I made the comment that soft-coded menu options are more flexible
because you can order them any way you want (and even skip some) and you
can number the options 1-N.  I brought that up just to indicate that
while the technique is valid, it's not usable in this specific case.

That's because the file in question has hardcoded menu options, which is
far more common in the ERP arena.  Therefore, in order to change the
order of the menu options AND have them presented in the menu
sequentially, I need to assign the numbers based on the order.

These are the ground rules I've set for the question:

1. The option number is in the file
2. I want to renumber the options by the program name
3. Program name is NOT a key field

Your confusion arises because I am changing the number of each option,
which goes against the idea of keeping the option numbers the same.
However, what I'm asking to do is a one-time shot.  After all the
options are in place, I want to run this magic utility to sort the
options.  I realize it's not a very practical technique: what happens if
you add a new option?  But it's part of a broader question: how do you
sort a physical file based on some arbitrary sequence.

As I said, the easiest way I could find was to use STRSQL to create a
sorted version of the file, and then copy that file back into the
original.  I'm trying to find an alternative to those two steps. 

Joe


> From: Walden H. Leverich
> 
> Joe,
> 
> I'm confused a little. You want the items in order by program name,
> fine. But do you want to renumber the options so the first is 1, the
> second, 2, etc. or not? At first I thought you did, but then you
comment
> on the ERP system issue of wanting the same # to mean the same thing.
> 
> If you do not want renumbering why not just load the subfile w/a sql
> statement, something like:
> 
> select option, program, description from menu order by program
> 
> Would seem appropriate. If you want it by description, then "order by
> description"
> 
> What am I not understanding, you should know this. Is this one of
those
> cases where you're stuck on one solution and don't step back to see
> another way (happens to us all) or am I not understand the
requirement?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.