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

A5v4 to A5v10 problem

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

    A5v4 to A5v10 problem

    Generally, the conversion to v10 has been easy, even with all the error traps that are automatically added to XBasic scripts.
    There is one problem that I have been struggling with:
    In v4, when you do a FBF then Browse.view, the display is of the selected records. However, in v10, the same script displays the entire database as with a default browse. I tried browse.viewqueried, and that did not help. Please - any suggestions?

    BillTav

    #2
    Re: A5v4 to A5v10 problem

    Bill,
    We're going to need a bit more information. FBF is find by form? Form is against a table or set and your finding a parent record if a set? Can you supply the current script that is problematic?
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

    Comment


      #3
      Re: A5v4 to A5v10 problem

      Thanks for your reply, Mike. This particular function is a very impotant part of what we use the database for. Perhaps we should stick with our old version4.

      Here are the significant part of script I used in Alpha 5 v4
      On push button labelled "Start Search":
      parent.find_by_form()
      parent.find_exit()
      parent.find_clear()
      parent.show_all()
      parent.find_by_form()

      Next we enter search text

      Next we push button :Execute Search"
      parent.find_run()

      Appropriate record appears on form
      fetch next or fetch previous can be used
      only records that match search criteria show

      Next we push "Browse" button
      :Browse.view("PopRecBrowse1")
      Browse table displays only matching records

      With the same script in version 10, Browse button displays the entire table

      I tried modifying the browse button script, but could not make the Browse.viewqueried work - I just don't know the exact syntax, I guess.

      I hope this will help you understand our problem.

      BillTav

      Comment


        #4
        Re: A5v4 to A5v10 problem

        Bill,

        When you move to the browse after the find by form, are you pushing a programmed button on your form, or are you pressing the browse button up on the left side of the standard toolbar?

        Don

        Comment


          #5
          Re: A5v4 to A5v10 problem

          Pushing the programmed button.

          Can you give me an example of the syntax that is correct for Browse.viewqueried to get isbasequery set to .F.? No matter what I try I get an error message. That may be the solution to my problem.

          BillTav

          Comment


            #6
            Re: A5v4 to A5v10 problem

            Bill

            I have attached a zip file that shows how to call a standalone browse filtered by a field in the calling form.

            When you push the button named browse it will take the value in the occupation field and then call the named browse and filter it according to that occupation.

            It uses the browse.viewqueried function to complete the task.

            Open the form in design mode and then right click on the button named browse and then select the on push event. That will show you the way a browse.viewqueried is set up to filter. The last parament in the function is .f. which means not to set a basequery.

            See if this is what you want.

            Tom

            Comment


              #7
              Re: A5v4 to A5v10 problem

              Aha - I am on the right track. Your suggestion is a partial solution. The critical item is "filt". In our situation any one or two or three fields out of about a dozen can be used by our searcher. And, again, version 4 handles this with no problem. The parameters for "filt" ddepend on the fields that are chosen.
              At least I know the syntax to use in the browse.viewqueried function.

              Bill

              Comment


                #8
                Re: A5v4 to A5v10 problem

                Tom,

                Looking deeper into your Will_Work example, I think I see a solution in the definition of v_job=parentform:occupation.value -- Can "occupation" can be replaced by a variable which would equal the field or fields requested by the searcher? Can v_job accept more than one search field?
                I am lost in the syntax of XBasic, and need help. My programming experience has been in Pascal and C+.
                This feature of Alpha 5v4 has been essential in our operation, and I hate the thought of having to scrap the upgrade t0 v10. Especially considering the many advantages in the upgrade.

                --Bill

                Comment


                  #9
                  Re: A5v4 to A5v10 problem

                  Bill

                  Have been working on this since I posted. First the variable can handle more fields - it is how it is set up that is the problem. You would probably (what I have been trying to do) have to create a xdialog drop down multi select list box containing the fields in the table (one way to do it). Your user selects the fields he/she wants to search and then I have to compose the the code to use the variable to write the filter.

                  I will work on this some more since I can see a need for this in some of my own applications.

                  Maybe in the meantime, someone else will read your last post and take a stab at it.

                  I still see there are several hurdles to cross in selecting the fields (only from the current form) and then creating the code to write the filter for the browse.viewqueried function.

                  Keep you posted.

                  Tom
                  Last edited by Tbaker; 02-05-2011, 11:45 AM.

                  Comment


                    #10
                    Re: A5v4 to A5v10 problem

                    Tom,

                    Thanks for your efforts. We use Alpha to catalog our holdings of over 200K of music records and sheet music, and we have a staff of volunteers who are barely computer literate. We have to keep compuer forms, etc. as simple as possible. Being a branch of the county library system, we are going to eventually put our catalog on the library website, and upgrading to v10 of Alpha is essential.
                    Is there any possibility of finding out how Alph 5v4 did what we need? I have a haunting feeling that there is a simple solution hiding somewhere.
                    In our present system, the searcher can (using QBF) enter a composer name (say, Chopin), execute the search, then press "Browse" and will see all our records with compositions by Chopin. If he additionally chooses in the Artist field: Horowitz, he will get all he recordings we have of Horowitz playing Chopin. Now we have the new, improved version 10 that cannot do this simple task. Frustrating.

                    Bill

                    Comment


                      #11
                      Re: A5v4 to A5v10 problem

                      I haven't delved into any of your code but perhaps the Current_filter_expn() command would help. Use it on the button to get the current filter expression for the form and pass that to the browse query.

                      Comment


                        #12
                        Re: A5v4 to A5v10 problem

                        Bill

                        I originally posted what I thought would be what you needed - but in zipping the file I had a glitch on my computer and the zip file that I sent will not work.

                        I opened my testing app and it was corrupted - it had been working fine all day until the last zip.

                        I have to go in and recreate the form and the code from an earlier backup - which was not quite finished

                        For anyone who downloaded the zip file it will not work - but I will get it back up as soon as I can.

                        Sorry for the mishap

                        One thing is I am glad and have a backup even if it an earlier one.

                        Tom

                        PS I have removed the zip file since it did not work.
                        Last edited by Tbaker; 02-05-2011, 04:29 PM.

                        Comment


                          #13
                          Re: A5v4 to A5v10 problem

                          Tom,

                          You forgot to attach the zip.

                          Bill

                          Comment


                            #14
                            Re: A5v4 to A5v10 problem

                            Cal,

                            I tried the following:
                            DIM filt as C
                            parent.find_run()
                            filt = current_filter_expn()
                            Browse.viewqueried("Browse1",filt,"","","",.F.)
                            Sorry - it did not work. Maybe I did it wrong?

                            Bill

                            Comment


                              #15
                              Re: A5v4 to A5v10 problem

                              Bill

                              I had a glitch and the zip I attached originally would not work.

                              Here is what I said on the original post that I changed

                              Bill

                              Here is a revised zip file.

                              Open the only form.

                              push the search button on the form - that button will relate to the record currently opened for its input.

                              A drop down box will appear - asking you to select the field or fields you want to search on. Select the fields and then push okay.

                              The named browse will appear filtered by the field or fields you select on that form.

                              If you have record 1 showing and you select occupation only, then the browse will show all those records that have an occupation of electrician. If you select name and occupation, then the browse will only show 1 record (the record you are on) in the browse.

                              See if this can work for you. I have commented the code so it is easire to understand.

                              The hardest part was getting only the fields on the form into the drop down for selection.

                              Tom
                              I have it fixed now and it is attached

                              Comment

                              Working...
                              X