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

Sort not working properly in sub-database

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

    Sort not working properly in sub-database

    Hi - need a little help.

    I am using Alpha Four v8.
    I am using Alpha for customer database set called Accounts and have a linked database that has the sales of each customer called Sales.
    The Sales database (one to many) is indexed by a date field as I want the lastest sales records at the top which it does.
    When I am in the main database of Accounts, I tab to my sub-form I created to see the sales of each customer, the sorting is not correct. It seems to be indexed by record number instead of by date.

    If I zoom down to the child database, everything is ok.

    Every month when I add in the sales of my customers, I have to export the sales to a temp database using the date index, do a global delete on my existing database, then import back the data I previously exported to get the dates indexed correctly when I view the sales in my Accounts set.

    Can anyone help?

    Thanks in advance.

    Mike

    #2
    Re: Sort not working properly in sub-database

    Mike,

    I'm no expert but I have similar situations working in Alpha.

    You lose me a bit when you say you are linked by a DATE field? I'm guessing there are other fields involved in the linking???

    One of my sets displays a listing of items for a particular invoice sorted by a size of the item. The parent database field for the link is INV_NUM. In the child database (one to many) the linking index expression uses the same INV_NUM (essentially the linking field) followed by the sort order I desire built from other fields....

    Index expression : STR(INV_NUM,5,0)+INVERT(ITEM_NUM)+INVERT(STR(HEIGHT,7,3))+INVERT(STR(RAIL,7,3))

    The result links all the matching INV_NUM records sorted as the linking index details.

    Does this make sense to your situation??

    Perhaps you could post your parameters?

    TJ Baker

    Comment


      #3
      Re: Sort not working properly in sub-database

      Sorry, I realize I was not very clear.

      My parent database has all my account names and info.
      My child database has all the sales of all my accounts.
      The link between the two is the account number.

      In view mode in my parent database, I created a sub-form showing the sales of each account linked by the account number. The index in the sales database is by Date shipped. The problem is when I add new sales to the child database, the new records get displayed only at the bottom of the form in view mode, not at the top where they should be because they are indexed by date.

      How can I get them to properly show up?

      Thanks again.
      Mike

      Comment


        #4
        Re: Sort not working properly in sub-database

        Mike,

        Again I must point out I'm no expert, just been using this program for many years and stumbled across a lot of things that work for me. Anyone else feel free to jump in.

        The sort order as displayed in the region of your form is determined by the index that is used to link the child database to the parent.

        The child database can have many more indexes as well, but only the index specified as the linking index when you built the set will affect the display of the region in your form.

        My previously posted example Index Expression is from my child database. It is named TV_LINK, seen in the set editor screen details pasted below .
        My "INV_NUM" would be the equivalent to your Account Number field. The remainder of my index expression determines my intended sort order for displayed records as viewed in the set. When constructing the set I selected this index as the linking idex for the child database, but for the Common Field/Expression I used only the first part of the childs index expression, "STR(INV_NUM,5,0)". I cannot say if this is the best, or even a recommended way to accomplish this but I can say that is has worked for me in many databases for more than five years now.

        TV_LINK Index expression : STR(INV_NUM,5,0)+INVERT(ITEM_NUM)+INVERT(STR(HEIGHT,7,3))+INVERT(STR(RAIL,7,3))

        S e t E d i t o r
        INVOICE -- Invoice Records
        ╞════► TV -- Turning Vanes
        ├───── JOBMASTR -- Master Listing - JOBS
        ├───── PRICES -- Materials Prices
        └───── INV_NUM -- Invoice Numbers, Reference

        ▄▄ INVOICE ══► TV ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
        Linked Database/Set : S:\CURRENT\TV.DBF
        Linking Index : TV_LINK
        Common Field/Expression: STR(INV_NUM,5,0)
        Link to ? : All
        Referential Integrity ?: Yes
        Cascading Updates ? : Prompt
        Cascading Deletes ? : Prompt

        Does this help at all??

        TJ Baker

        Comment


          #5
          Re: Sort not working properly in sub-database

          TJ,

          I must thank you for the time you are spending treying to help me. It is much appreciated.
          Trust me when I say I am much less an expert than you are.
          Unfortunately, what you suggested did not work, most probably because my database structure is not properly organized.
          Would I be able to send you the database for your review. I can trim down the records so it is not large and very small.

          My email address is [email protected]

          Again, thanks in advance for any help you can give me.

          Mike

          Comment


            #6
            Re: Sort not working properly in sub-database

            Mike,

            I have found that it doesn't always work for me the first time through and I have to play with the exact index expression to get things to fly.

            Sure, you can send me what you have, I have broadband connection(s) so the size unless extremely large isn't an issue and I love a challenge!

            Lets try my yahoo address first, if that doesn't work out I have others.


            [email protected]

            Comment

            Working...
            X