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

Browse Sorting Doesn't Work

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

  • Browse Sorting Doesn't Work

    Well I've been pulling my hair out over this one and after trying myriad alternatives I remain truly perplexed and am now at sort of an impasse.

    I have encountered consistent problems getting embedded browses to properly sort. I've tried complete set and form rdesigns thinking maye its just corruption in one or the other. Nope. I've tried repacking and reilding indexes till I'm blue in the face. No go. So, I've prepared a simple example illustration of what I'm running into.

    In the attached database I have defined essentially two identical sets - one includes a filter placed on a child table and another doesn't. The one with the filter defined as part of the set will not correctly sort an embedded browse for the child table that is placed on a form. However the same set without the filter defined in the set does permit the child browse to properly sort. Also of even more interest is that if the form properties (rather than the set) define exactly the same filter that the set defined the child browse will correctly sort.

    One of my additional puzzlements is that in extensive playing around with filters and other embedded browses of somewhat more complexity I have encountered even more erratic and inconsistent results - like sometimes a the same exact set with a defined filter will correctly sort and other times it may not. Anyway Can anyone provide an explanation of the behavior exhibited in the simple examples I've attached. Maybe if I can perceive the explanation for this simple failure I can then deduce what may be happening with some of my more complex sets which aren't correctly sorting.

  • #2
    Re: Browse Sorting Doesb't Work

    Being fairly new to A5 I may be talking way over my head, but;

    I downloaded your data and noticed that most of your indexes are greater that 7 characters long. I attended a A5 WEBinar a few weeks ago and one of the few absolute rules that they stated is that “You should never use index names greater than seven characters”.

    If I have time I’ll fiddle a bit tonight and see if that clears the problem.

    Mike T.
    "We can't solve problems by using the same kind of thinking we used when we created them"

    Albert Einstein

    Comment


    • #3
      Re: Browse Sorting Doesb't Work

      Originally posted by MikeThomas View Post
      Being fairly new to A5 I may be talking way over my head, but; I attended a A5 WEBinar a few weeks ago and one of the few absolute rules that they stated is that “You should never use index names greater than seven characters”.

      If I have time I’ll fiddle a bit tonight and see if that clears the problem.

      Mike T.
      Hi Mike,

      I wonder what the reasoning is behind this? Check out this link and you'll see, not only are all indexes more than 7 characters but some are multi field.

      http://support.alphasoftware.com/alp...lpv8/index.htm

      kenn
      TYVM :) kenn

      Knowing what you can achieve will not become reality until you imagine and explore.

      Comment


      • #4
        Re: Browse Sorting Doesb't Work

        Kenn,

        The A5 WEBinar seemed to say that the original DBase had a 7 character limit on all names, A5 has removed all the limits EXCEPT on the Index names. I did quite a bit of DBase 4 programing, in a past life, and they did have defined naming rules. For now, I'll just follow explanations given by the folks that know about the rules of A5. In thinking about what they said, I think they implied unreliable operation when index names are or 7 characters.

        Mike T.
        "We can't solve problems by using the same kind of thinking we used when we created them"

        Albert Einstein

        Comment


        • #5
          Re: Browse Sorting Doesb't Work

          I don't see the problem or any mystery. If you create a sort order in the set definition you cannot sort the browse displaying child records.

          The issue of index expressions is beside the point.

          What precisely are you trying to achieve?
          Bill Hanigsberg

          Comment


          • #6
            Re: Browse Sorting Doesb't Work

            Originally posted by MikeThomas View Post
            Kenn,

            The A5 WEBinar seemed to say that the original DBase had a 7 character limit on all names, A5 has removed all the limits EXCEPT on the Index names. ....... In thinking about what they said, I think they implied unreliable operation when index names are or 7 characters.

            Mike T.
            Mike,

            I checked the indexes in AlphaSports. Most are over 7 characters, 9-or 10 and one is 15. Following the advice you received will not cause problems for you but I would not think the folks at Alpha would advise developers of the problem so folks could adjust accordingly.
            The ones who taught the Webinar are much more knowledgeable than I and their advice should not steer anybody in the wrong direction.

            kenn
            TYVM :) kenn

            Knowing what you can achieve will not become reality until you imagine and explore.

            Comment


            • #7
              Re: Browse Sorting Doesb't Work

              It isn't 7 characters, its 10 characters for indexes. I wonder why they said 7, unless it has something to do with sql,web,etc.
              Cole Custom Programming - Terrell, Texas
              972 524 8714
              [email protected]

              ____________________
              "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

              Comment


              • #8
                Re: Browse Sorting Doesb't Work

                The issue I described with sorting filtered browses is not related to the length of the index names. I truncated all the index names in the sample that I posted and it made no difference. Also Alpha documantation explicitly states for the length of index names: "32 (10 is recommended)". A5 itself automatically generates index names which are concatenations of an A5 generated character sequence and the actual field name - which results in indexes created in this manner exceeding even the recommended index name length. So it wouldn't be sensible to have a 7 chracter limitation.

                Anyway, has anyone yet duplicated/confirmed the erratic behavior of the embedded browse sorts that I documented. A fix? Nobody else has ever experienced this?

                Comment


                • #9
                  Re: Browse Sorting Doesb't Work

                  Bill H. gave you the answer - remove filters and sorts from the set. Its always better to filter and order at the form level.
                  Cole Custom Programming - Terrell, Texas
                  972 524 8714
                  [email protected]

                  ____________________
                  "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                  Comment


                  • #10
                    Re: Browse Sorting Doesb't Work

                    So what exactly are the rules for deploying filters and sorts as part of a set design and alternatively, or in conjunction with, form design? It’s not my intent to belabor this but I have searched the A5 documentation and have yet to come across a single, cohesive discussion of the topic. So far I’m left only to surmise the following based on my experience with A5 plus the comments of other far more seasoned developers.

                    1) Rule # 1: Don’t apply filters or sorts as part of a set definition. Why? Drawing on my experience and message board comments from others they just don’t work consistently or correctly. I can probably live with this one … but then my next question is then why is the ability to do use them in set design even provided.

                    2) Rule #2: You can apply one and only one sort, filter or sort/filter combo to a form design. Why? Again drawing on my experience and message board comments any more than one filter, sort, or combination applied to the same form produces very erratic display results. If this is in fact the case then I’ve got a big problem with the utility of A5 as a development tool; such a big problem that I have to think that my understanding of the use of filters and sorts as they apply to form design employing multiple tables must be either wrong or quite confused.

                    So, let me posit the following:

                    A) I have a set comprised of a parent and several child tables, each linked for arguments sake to the parent by a one to many relationship.
                    B) I have need to design a form displaying records from the parent table, with the records sorted alphabetic on a character field.
                    C) On the very same form described in (B) I have a need to display embedded browses for several of the related children tables, each browse possibly requiring a filter to restrict the range of specific records displayed in the browse and each browse needing to be sorted on a meaningful character field to organize the sequence in which the filtered children records are shown. For example several of the embedded browses need to display records in ascending sort order based on their unique alphabetic ID fields and simultaneously filter the actual range that participate in the browse view according to values of a particular fields that aren’t used in the file links defined in the set.

                    Lets say the parent table is called Properties. I have several children tables linked to the parent based on the common key called Property ID. When I create a form starting with Properties I want the properties to be sorted by Property Name, which I define in the form properties Filter/Sort tab. I have a child table called Facilities for which I want to have the children records listed in an embedded browse placed on the parent form. But for this embedded browse I only want the children Facilities to show that are classified as “Rental” and have them sorted in order of their Facility ID. A third embedded browse needs to show the Facilities children again but in this instance filtered to show those that are classified “Nonrental” and similarly sorted in the same order by Facility ID. I have several other embedded browses with similar requirements but I think you get the idea. Can it be done? My experience says no. I hope I’m totally wrong.

                    If I design such a form and the embedded browses, applying filters and sorts as needed in the form properties, the final result is a mixed bag of some of the browses working and some not. They appear to filter and sort properly except some don’t correctly the focus on the top row and instead want to drop to the last row, in which case they also do not properly show field content that may be placed outside the browse(s) directly on the parent form. See attached screen capture.

                    I might also mention that as experienced by another A5 poster on this board I have also experienced A5 arbitrarily dropping sorts applied and saved to a parent table in the form properties. Huh? They just disappear of there own accord. See:
                    http://msgboard.alphasoftware.com/al...ad.php?t=74157

                    So can someone clarify the filter/sorting rules, limitations, et al or suggest how my understanding of their usage is flawed because I’m just not getting it.

                    Comment


                    • #11
                      Re: Browse Sorting Doesb't Work

                      Hi Douglas,

                      Is this a fair summary of what you want to achieve?

                      You have a form based on a set. On the form, you want to show x number of browses each based on a of the child tables.

                      I presume the child tables are just that, child tables and you are not using a grandchild table?

                      kenn
                      TYVM :) kenn

                      Knowing what you can achieve will not become reality until you imagine and explore.

                      Comment


                      • #12
                        Re: Browse Sorting Doesb't Work

                        See images
                        the set is one parent and two one to many child tables - the set contains no filters and no orders(sorts)

                        note that the two child tables are both sorted by date in descending order

                        and note that I have used form properties to establish a filter and order for the parent, and for the first child table (the second child table has the same sort)

                        in some cases, for optimum flexibility, I have no filters or orders on either the set or the form, and set them at form initialization, and reset them based on operator requests as per buttons, ui's, etc.
                        Cole Custom Programming - Terrell, Texas
                        972 524 8714
                        [email protected]

                        ____________________
                        "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                        Comment


                        • #13
                          Re: Browse Sorting Doesb't Work

                          here is an image for the child sort - messed up adding two images
                          Cole Custom Programming - Terrell, Texas
                          972 524 8714
                          [email protected]

                          ____________________
                          "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                          Comment


                          • #14
                            Re: Browse Sorting Doesb't Work

                            1) Rule # 1: Don’t apply filters or sorts as part of a set definition. Why?
                            Sure you can. But if you do, it may prevent you from changing the filter dynamically.


                            Rule #2: You can apply one and only one sort, filter or sort/filter combo to a form design. Why?
                            Not true. You can apply an unlimited number of filters to a form.


                            I might also mention that as experienced by another A5 poster on this board I have also experienced A5 arbitrarily dropping sorts applied and saved to a parent table in the form properties. Huh?
                            Unfortunately, I have seen this happen in various versions of Alpha. Therefore, I generally use xbasic (you can use action scripting) in the form's OnInit event.
                            Peter
                            AlphaBase Solutions, LLC

                            [email protected]
                            https://www.alphabasesolutions.com


                            Comment


                            • #15
                              Re: Browse Sorting Doesb't Work

                              actually, it doesn't 'arbitrarily' drop the sort or filter
                              if you do ANYTHING to resort the form or a find, it will lose the sort and or filter

                              You have to enable the user to resort to the original and to the original filter - I always handle everything with xbasic.

                              basequeryrun() is a good way to filter and sort
                              Cole Custom Programming - Terrell, Texas
                              972 524 8714
                              [email protected]

                              ____________________
                              "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                              Comment

                              Working...
                              X