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

  • #16
    Re: Browse Sorting Doesb't Work

    Originally posted by martinwcole View Post
    actually, it doesn't 'arbitrarily' drop the sort or filter
    Hi Martin,

    I guess it depends on what you mean by "drop". What I am referring to, and have experienced in different versions of A5, is a form losing (deleting, if you will) the form filter definition stored under form properties. Then you have to recreate it from scratch. Thus, I too, typically use xbasic in the OnInit event.
    Peter
    AlphaBase Solutions, LLC

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


    Comment


    • #17
      Re: Browse Sorting Doesb't Work

      thanks Peter - wasn't aware that you were referring to 'deleting' them, as in indexes under certain circumstances. I have to always deal with a form's filter properties especially being dropped when you run a query, etc. Is easy to overcome if you are fluent with xbasic, but i suspect could be quite frustrating if everything is done in a/s.
      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


      • #18
        Re: Browse Sorting Doesb't Work

        My experience thus far is that A5 will delete a sort order that was defined and saved in form design in the form properties filter/sort tab. And by delete I do mean delete as in permanently from the form design.

        I define a simple one field sort for a parent table by which the form is opened. I then save the form design, close it completely, and then reopen it for viewing to test/validate the design - nothing fancy or complicated being done, just opening the form for viewing. Most of the time the defined sort is operative. But on a very random basis it is not and when I reopen the form in design mode the sort has simply vanished - none of the subsidiary sorts defined for children tables are missing, just that one for the parent table. And I am not doing any additional sorting when this happens. I thought I was nuts because of the

        I can understand that applying a new sort in the view mode could/would override the stored sort and necessitate a user then having to manually revert the sort back to the original order for that viewing session, or perhaps close and reopen the form to restore the stored default sort(s) . But I don't think that A5 should permanently deletie the stored sort from the form design when the form is being opened in an otherwise non modifiable instance. It should at most simply ignore the stored sort order. I have some concerns about this. What's to be expected when an end user gets a runtime application with stored sorts that willy nilly get permanently deleted? Not good. Not good at all. Stored sorts should not be arbitrarily deleted from the form, otherwise what's the pracatical benefit of defining them in the first place if you can't rely on them being there when the form is opened?

        Comment


        • #19
          Re: Browse Sorting Doesb't Work

          submit a bug report, if you haven't already.
          be sure to include a small adb and instructions for duplicating the issue.

          of course, here, because its random, it will be an issue.
          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


          • #20
            Re: Browse Sorting Doesb't Work

            No bugs.
            No need to pull any hair.

            Didn't read the entire thread as I had a good suspicion on reading the original post what the problem is and sure enough found it right off.

            In the second "mal-functioning" form, you put a sort order and left the filter blank.

            All you had to do is put .t. in the filter box and all is well with the world.

            The word "bug" gets thrown around way too much. Some philosphical argument could say: alpha should have known on it's own that when the filter is left blank it means .t. !

            To which I say, says who?
            The fact that you didn't fill all boxes, does not make it a bug. Only bug might be in documentation: alpha could either alert you to filling all boxes or take blank to mean .t. It should as an intutive action, but does'nt have to. Add it the wishlist not to the bug reports.
            Last edited by G Gabriel; 08-12-2008, 02:19 PM.

            Comment


            • #21
              Re: Browse Sorting Doesb't Work

              Between Martin's and now G's method to overcome this "flaw", I will attempt in doing this to see if my situation is resolved as well. I had mentioned this so long ago with no response that I thought I was simply alone in this dilemma.

              Am of great hopes now to have a cure for this problem of disappearing form sort expressions although I swear I did at one time place .T. in the filter box....guess time will tell as it only occurs after working on the application for a few days to weeks (and MANY times not even touching the form(s) in question I might add!!).
              Mike
              __________________________________________
              It is only when we forget all our learning that we begin to know.
              It's not what you look at that matters, it's what you see.
              Henry David Thoreau
              __________________________________________



              Comment


              • #22
                Re: Browse Sorting Doesb't Work

                I won't disagree with Gabe, as his diagnosis may be true. And apparently it really is an issue. However, that said, let me note that I have an app with 359 forms, that I started working on in Version 5, currently in V9, and I have never had the issue, as far as I know. And many of them have sorts but no filters.

                here is code that runs when a user asks to see clients and invoices with a balance due:

                Code:
                on error goto errors
                lastuse=toseconds(time())
                t=table.current(1)
                query.filter="baldue <> 0"
                query.order="company"
                query.options=""
                idx=t.query_create()
                parentform.Resynch()
                t=table.get("invoices") 'a child
                query.filter="amountdue > 0"
                query.order="invoicedate"
                query.options=""
                idx=t.query_create()
                parentform.Resynch()
                end
                errors:
                err_msg = error_text_get(error_code_get())
                line = error_line_number_get()
                script = error_script_get()
                ui_msg_box("Error", err_msg+" Error occurred at line "+alltrim(str(line,4,0))+ " in script: "+script)
                end
                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


                • #23
                  Re: Browse Sorting Doesb't Work

                  Martin,
                  The issue is when the form's properties are used to set the Order (and filter), not when xbasic is used. I want to add, for others not familiar with it, the basequery that has been mentioned remains and cannot be dropped unless it is specifically set to "" . The typical .show_all(), query.drop(), etc., will not get rid of it (nice to know when some query methods use a basequery).
                  Mike
                  __________________________________________
                  It is only when we forget all our learning that we begin to know.
                  It's not what you look at that matters, it's what you see.
                  Henry David Thoreau
                  __________________________________________



                  Comment


                  • #24
                    Re: Browse Sorting Doesb't Work

                    Mike, I was talking about using the form's properties to set filters and orders; many of my forms have them. I was just throwing in the script to give examples of how to "re-sort" and filter via xbasic for multiple files.

                    I frequently use basequeryrun() - very nice. But even then you can kill it if you are using xbasic to add additional filtering. Sometimes with xbasic I will get the form's current filter and add to it, as a way to maintain a base filter when doing additional filtering via xbasic.
                    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


                    • #25
                      Re: Browse Sorting Doesb't Work

                      Mike, I was talking about using the form's properties to set filters and orders
                      I was afraid of that!! Which most likely means something else is going on with my and other's order expressions disappearing....but am still going to set all the filters to .T. just to see----will report back if the order expression disappears again but it could be weeks 'til it happens again.
                      Mike
                      __________________________________________
                      It is only when we forget all our learning that we begin to know.
                      It's not what you look at that matters, it's what you see.
                      Henry David Thoreau
                      __________________________________________



                      Comment


                      • #26
                        Re: Browse Sorting Doesb't Work

                        I believe this issue appeared in v8, not any time before.

                        Some people went around and around in circles in a related issue where you define a filter but not a sort for an embedded browse (I think Mike Wilson could attest to that) and it does not work until you define the sort. This is almost the same but the parameters are reveresed.

                        The morale of the story is:
                        If you define a filter, deine a sort and vice a versa and save yourself a lot of headaches.

                        It's only a gusess on my part, but because filter and sort are optional query parameters, alpha as it builds the expression based on your parameters, if one of those parameters is lacking, it messes up the expression based on what expression is used and in which order these parameters are specified in the expression. Not knowing which expression alpha uses to build these queries (internal) can't tell for sure but I could only guess if filter precedes sort in the expression and if filter is left blank (alpha should use .t. as default) then the epxression is messed up.

                        Add to the wish list:
                        If filter is left blank, use .t. as default.

                        Comment


                        • #27
                          Re: Browse Sorting Doesb't Work

                          I, too, have trouble sorting one of my databases. It used to sort fine, but not anymore. What could possibly happen to it? Is something on checked right?
                          Martha Walters
                          [email protected]

                          Comment


                          • #28
                            Re: Browse Sorting Doesb't Work

                            This is a good question for which no answer is possible because you've not provided any details. We cannot assume you have the same set of circumstances. If you have an issue and desire an answer, I suggest to start a new thread. Not only is this thread more than 3 years old but v11 has been released.
                            TYVM :) kenn

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

                            Comment


                            • #29
                              Re: Browse Sorting Doesb't Work

                              If you are sorting on an indexed field and the sort doesn't appear correctly, try updating your indexes.
                              There can be only one.

                              Comment

                              Working...
                              X