Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Alpha5 1.0.2 Indexe

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Alpha5 1.0.2 Indexe

    I have a numeric field that is created by "recno()" function. When I use this field as an index, it is sorted numerically but any revised or new fields are listed at the end in the order they were revised or added, out of numerical order.

    I have a similar field that is "user entered" and this sorts in numerical order--1 thru the highest number.

    Any answers?

    #2
    RE: Alpha5 1.0.2 Indexe

    I've tried this out and here's what I get. I had two fields, one named "BLURB" and the other named "THEREC". The latter I had as a numeric field, and set it (via Field Rules -> Type) as "Calculated", the expression being "RECNO()". Then I created an index on the field, named "BY_THEREC". I added and altered records, both with the index set to "BY_THEREC" and with it set to something else (eg "BY_BLURB", or the default - "Record-number order"). Nothing untoward happened.

    I suspect, though, that if I delete a record and "pack" the database I'll get trouble... yes, I do. If I delete record 3 (of 5), and pack the database, I'm left with four records, with THEREC values of 1,2,4,5. If I then add a record (the 5th) it gets assigned a THEREC value of 5. So now I have five records, with THEREC values of 1,2,4,5,5.

    And if I alter the record whose THEREC value is 4, then as it's (now, since the "pack"ing) the 3rd record, its THEREC value (being re-calculated) automatically changes from 4 to 3. So now I have records with THEREC values of 1,2,3,5,5.

    However, if I choose "Re-evaluate Rules" (from the Field Rules panel), it seems that the jumble gets sorted out: the THEREC values are all re-calculated (and are changed from 1,2,3,5,5 to 1,2,3,4,5).

    Is this the sort of behaviour you're getting? Have I set up my database properly to mimic yours? Is there another way of indexing your database that'll still do what you want (eg an auto-increment field)?

    Chris Ohlsen (London, UK)

    Comment


      #3
      RE: Alpha5 1.0.2 Indexe

      Using recno() as a base for an index is NOT very good practice for just the reason you are having. Recno is automatically assigned, but if you delete and pack your database, then your index goes to h*** in a handbasket. An alternative would be to assign a starting value to the first record in the database, then make the field "auto increment". This way, the key field is NOT tied to the record number, but is generated automatically. If you start with "1" then auto increment, for the most part, your key fields will mimick the recno(), but in the case of deleted and packed records, your key will just take the next value and not mimick an already used recno().

      Tom

      Comment


        #4
        RE: Alpha5 1.0.2 Indexe

        Chris:
        What I was trying to accomplish was to avoid manually numbering an existing file with over 1,000 entries.

        I ended up manually numbering in an auto increment field because time was a factor.

        Thanks for your reply anyway.

        Bob

        Comment


          #5
          RE: Alpha5 1.0.2 Indexe

          Tom:

          What I was trying to accomplish was to avoid manually numbering an existing file with over 1,000 entries.

          I ended up manually numbering in an auto increment field anyway because time was a factor and, as you mentioned, RECON()was not the way to go.

          Thanks for your reply.

          Comment


            #6
            RE: Alpha5 1.0.2 Indexe

            Would any of these approaches have worked?

            (i) Add a calculated field (the calculation being recno()) to the pre-existing database (which I assume contains records already). Run "Re-evaluate field rules" to get this new field filled in for all the records. Then - via the Field Rules card - change the field from "Calculated" to an 'ordinary' one... *if* this is allowed, and now set the field as "auto-increment" (so that any further records added will be auto-incremented).

            (ii) Add a new field, and use the "Update" facility to update all records, the expression on the Update Card being "recno()." Then set the field (via Field Rules) as auto-increment.

            (iii) After adding the ID field to the database structure, run a script resembling the following (in "pseudo-code"):

            set index to record-number order
            fetch first record (as determined by the index)
            counter = 1
            while not end-of-file
            change begin
            ID field = counter
            change end
            counter = counter + 1
            fetch next record
            end while

            Then set the field (via Field Rules) as auto-increment.

            I have used technique (iii) with success, but can't recall if I've tried either of the first two.

            Chris Ohlsen

            Comment


              #7
              RE: Alpha5 1.0.2 Indexe

              Robert:
              For future reference, the second (ii) option in Chris' message (id 1291) above, which included a one-time "update" of the database to replace the new field with value recno(), followed by setting field rule for new field to auto-increment, would surely have accomplished very easily what you required. I would establish index on new field after above update procedure (though I'm not sure it makes any difference whether before or after update). As Tom points out, it is not good practice to include recno() as part of an expression that is to be used on a recurring basis; however, for the one-time use described in Chris' option ii), it is certainly useful and time-saving.

              another Robert

              Comment

              Working...
              X