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



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.view query setting for record selection

  • Filter
  • Time
  • Show
Clear All
new posts

  • Browse.view query setting for record selection

    We use the browse.view function and for everyone else in the shop it is working fine, however, mine is not. When i run a query, i get the records i expect to see, but when i follow the query with a browse.view it selects either the entire table or displays the records from a prior query. This happens weather i'm running my a5 developer or runtime. Some configuraiton parameter must have got reset because i did not have thjis problem last week. Thanks!

  • #2
    Re: Browse.view query setting for record selection

    If you are using the Query genie to run multiple queries, the Run Query button should pop up a list with several options for the record set to use. Have you used that?

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford


    • #3
      Re: Browse.view query setting for record selection

      Hi Robin,

      No I do not use that. I switch between ad hoc query and running queries from our forms. Yesterday I was using ad hoc query and it worked fine from my work station in our production database. I was trying to figure out if some setting in ad hoc query was affecting the query I run from the forms we developed and it seemed to have an affect. So maybe some setting in ad hoc query is affecting the form query from my work station. What's even stranger is that I am not having this problem when I log into our test and development system from my workstation. It seems like the production database is "remembering" or "forgetting" something about my workstation.

      Here's an example ... I ran an ad hoc query on a key field using value, lets say AAAAAA in our production system. Then I ran a query from a form using value BBBBBB. When I selected the browse button on the form that makes a call to browse.view the records for value AAAAAA appeared. If I log out of the production system and log back in and run the same form query, when I hit the browse.view button it displays all the records in the database. :(

      I have seen a setting when I use the export table utility. There is a button on the bar labeled "Select Records". I always look at this before doing an export because this will affect if all records are exported or records from the last query are exported. This kinda reminds me of the query issue I'm having. During export A5 will "remember" the last query I did and use this when exporting if I do not select the "All" option.



      • #4
        Re: Browse.view query setting for record selection

        nt - dupe
        Last edited by MoGrace; 08-31-2018, 03:46 PM.

        Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford


        • #5
          Re: Browse.view query setting for record selection

          I know there is an 'Ad-Hoc Browse' so I am confused when you say 'Ad Hoc Query' as to what you mean. Also is the browse button you are using the one on the system's form toolbar that opens the browse view that switches from form view to browse view? (or using the F8 hot key, or a system menu selection). Or are you using the right click menu when a field is selected on a form, where there is an option for Quick Filter. If that is what you are using to filter by a field value then using the F8 key (or toolbar button or menu option) it should switch you to the default browse view using that same query.


          Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford


          • #6
            Re: Browse.view query setting for record selection

            Yes, it is called "Ad Hoc Browse", sorry for the confusion.

            We do not use the browse button on the system's form tool bar or the F8 hot key.

            We use forms developed in house that have a browse button coded into them. When the browse button is selected (OnPush) the following code executes …

            DIM SHARED SP10 AS P 'Define shared browse window pointer

            if (IS_OBJECT(SP10)) then 'Close Browse window only if one exists
            SP10.close() 'This prevents multiple browse windows
            end if

            SP10 = Browse.view("Browse10@pop records") 'Open browse window, initialize SP10

            The Browse.view call selects the browse program name(Browse10) and the table name(pop records) to browse. The records selected are based
            on the most recent query that the form executes.


            • #7
              Re: Browse.view query setting for record selection

              Since your browse has a name I assume you have saved it to the control panel. If that is the case then you can set that named 'companion browse' in the form's properties (browse must be based on the same table or set the form is using else it won't appear in the select list). Then in the browse properties, do the same and select your form name. Now the user can use the F8 hotkey or the toolbar button to toggle between them and that default action will not open a duplicate instance of the browse. If you want to keep your button, just have it send_keys("{F8}".

              Right now your button script will drop the form's query if the browse is already open. Whereas the built in toggle function will always find the selection. Your current script is not doing anything to link the browse to the current record nor does it run a query in the browse.

              If you want to have both the form and the browse open at the same time your button script will have to get a pointer to the current record or query before activating or opening the browse to either find the record or create a query filter.

              So when you say 'Ad Hoc Browse' is the user creating this browse (selecting the fields, query etc.) each time they want to see it?
              Last edited by MoGrace; 09-05-2018, 02:10 PM.

              Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford


              • #8
                Re: Browse.view query setting for record selection

                We do not use 'Ad Hoc Browse' on a regular basis, we use forms developed in house for queries and/or browses.

                Looking at the properties of the browse program, I did find the configuration parameter that explains how our browse program works with our forms that do the queries that I have been looking for, so thanks for bringing up properties.

                There is a browse property tab called 'Filter/Order' and a check box for 'Use the last run query' that is selected. So when I run a query with our form, then select the browse button that executes the code you see above in a prior thread, the Browse.view function uses the last run query performed by the form as its filter. This is where my workstation fails. It selects all the records from the table which is the default behavior of browse.view if the 'use the last run query' box is not selected in the 'Filter/Order' tab found in the properties tab.

                I could not find the parameter in the form or browse properties to configure a 'companion browse' or 'companion form'.


                • #9
                  Re: Browse.view query setting for record selection

                  Image 33.png

                  Image 34.png

                  The information about "Last run query" (actually the last 4 queries are available) for each table (dmgrecl.dbf in this example) is stored in the Windows registry under a key named (for V11)

                  HKEY_CURRENT_USER\Software\Alpha Software\Alpha Five 11.0\INDX\FFFF01D5-DMGRECL.DBF;1

                  the details of the query itself are stored in a file which can be found under that key

                  FILE=~C:\Alpha\privpath\$$101E01.MPX~ DESC=~Temporary Query~

                  The location of that file is determined by the Alpha Settings, Directories, private path specified.

                  private path.png

                  If your workstation isn't honoring the last run query there may be something wrong with the registry or the private path setting.
                  Last edited by Stan Mathews; 09-06-2018, 03:20 PM.
                  There can be only one.


                  • #10
                    Re: Browse.view query setting for record selection

                    Hi Stan -

                    This is a lot of great info about the W10 registry and A5 ... so I edited mine and deleted keys INDX and Table since as far as I could tell just held temporary and work areas about the database tables. I really thought this was going to fix the problem, but it did not. I can also see the *.MPX files in my Windows temporary file folder (%TEMP%).

                    I'm going to keep looking at the registry, but I may just re-install my A5 Client and see if that fixes the problem.



                    • #11
                      Re: Browse.view query setting for record selection

                      Hi Robin and Stan,

                      I figured out what the problem is ...

                      Everyone accesses our production system from the "J" drive mapped on their PC's with a local copy of A5 Runtime installed.

                      My PC is the ONLY one that has both the test & development system(mapped as "M") and the production system(mapped as "J").

                      I recently updated our main menu form using the tst/dev system and moved it to the production system along with a bunch of other modifications.
                      During one of my troubleshooting sessions I disconnected my tst/dev "M" drive and things started working correctly in the production system for me.

                      I took a closer look at the main menu form and when you select(onpush) a button two actions are performed

                      1) close the current form
                      2) open another form

                      I noticed that the location of the form to be opened was still pointing to the "M" drive to locate the *.DDD files. For some reason
                      it is not using a relative file pathname. So A5 does not find an "M" drive on everyone else's PC but continues looking for
                      the *.DDD files in their current folder or "J" drive and continues to operate correctly. On my PC it finds the "M" drive and starts
                      using objects from the tst/dev *.DDD files ... oops!

                      So I think it is interesting that Alpha 5 did not give the users an error when it could not find the "M:\*.ddd" files but continued to look for them on the "J" drive.

                      What could I have done to the main menu form that caused it to use a hard coded drive location for the forms selected?

                      Thanks ... Mark


                      • #12
                        Re: Browse.view query setting for record selection

                        Hi Mark,
                        You still might want to reverse the closing of the current form and opening of the new form, so you open the other form first.

                        Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford


                        • #13
                          Re: Browse.view query setting for record selection

                          Hi Robin,

                          Here's an attached screen shot of what is causing my problem. My DEV/TST system is on the "M:" drive. My production system is on the "J:" drive. If I have both the M drive and the J drive mapped, I have the above described problem. If I disconnect the M drive my problem goes away.


                          I did my development on the M Drive and this drive code followed the form into production. Users without an M drive do not experience a problem because Alpha 5 ignores the M drive reference and finds all its objects on the users J drive.

                          When a layout is exported I would think that Alpha 5 would drop the hard coded drive references and look in the current or relative folder for its objects, which it is kind of doing by ignoring the hard coded J drive reference.