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

Help on a Query [Old Guy]

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

    Help on a Query [Old Guy]

    I've done A4V6 for years, sell apps, etc and have returned to A5v4 to continue the learning curve struggle -- I've hit a bugger and hope someone out there can tell me what I'm doing wrong.

    Query using the 'Expression Builder'

    EXPRESSION IS....
    month([date field])=Var->Askn_user_What_month_number

    Evaluation gets 'Invalid Field' when 'Run' in this syntax. However, when I take off the ask variable, I can see an evaluation that produces numbers, i.e. 11.0000, 1.0000, etc. It doesn't matter if the query is saved or not - still gets the message and won't even produce the 'Ask' dialog box.

    What in the world am I doing wrong. Help before I put A5v4 back on the shelf again for another two years - and may not even live that long!

    Thanks

    Ken

    #2
    RE: Help on a Query [Old Guy]

    Ken,

    Welcome to the club. Try it this way:

    month(date field,Var->Askn_What_month_number)

    kenn
    TYVM :) kenn

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

    Comment


      #3
      RE: Help on a Query [Old Guy]

      Ken,

      I got this to work OK here by changing your formula just slightly.

      In my query definition, under field/expression, I entered:

      month(MyDateFieldName)

      (Alpha5 doesn't need nor require the square brackets around field names, although I have never tried it and it might work)

      Under condition, I clicked on from the variable list above, and that resulted in:

      var->Askn_Month

      Runs just fine here. Let us know if you cannot duplicate.

      Tom Lyon

      Comment


        #4
        RE: Help on a Query [Old Guy]

        Argh, I forgot this board eats brackets. If you click on reply then read my reply in the smaller window, it will show the missing items.

        Is there any chance of getting this fixed, Admins? Pretty please?

        Oddly, it appears that messages I post are using HTML, even though I've not checked Use HTML.

        Tom Lyon

        Comment


          #5
          RE: Help on a Query [Old Guy]

          The expression builder is not designed to evaluate ask variables. Any expression which uses them will generate some error. Selwyn has indicated that ask variables are included in A5v4 only for compatibility with earlier versions.

          "The more elegant way" is to create a variable, let the user enter the variable, and refer to the variable in your expression. At least you won't get the error message you mention here.
          There can be only one.

          Comment


            #6
            RE: Help on a Query [Old Guy]

            Stan,

            You are right but there needs to be a quick, easy way. I say this because in Access, this is a very simple procedure as shown by the following two examples of a query where user input is needed:

            A. Between[Enter Begin Date]and[Enter End date]
            B. [Enter Case Number]

            The above is placed in the criteria portion of the date field or case number field. When the query is run, the propmt/s appear/s. Forms, reports and browses can be created based on the query. As you can see, it can't get any easier. Thus, if this could be done in the Detail Properties filter of a report or when creating a query, what could be easier? I hope V5 refines the procedure of Ask-Var.

            For those who have written variables, it's old hat. There was no other way. There is an easier way to do it, it just needs to be fine tuned.

            Kenn
            TYVM :) kenn

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

            Comment


              #7
              RE: Help on a Query [Old Guy]

              Using a form for variable input can provide a greater level of control. Also, creating queries via XBasic, in my opinion, offers a great deal more flexibility as well. One can trap zero find queries or qualify data entry. I think it's a good step forward to try to use XBasic for these things, especially if creating applications for others to use.

              One of the nicest aspects of Alpha5 is that it offers us options, regardless of the level of expertise we wish to employ for a particular function.

              Tom Lyon

              Comment


                #8
                RE: Help on a Query [Old Guy]

                Additionally there are the ui_get.. functions.

                I still think that if the decision was made to leave in the ask variable feature, it should be fully functional, not limited to occasional use by incomplete implementation.
                There can be only one.

                Comment


                  #9
                  RE: Help on a Query [Old Guy]

                  Tom,

                  I couldn't agree with you more. A5 is much more flexible than Access, at least at my level of expertese. The QBF and Reports have left Access in the dust. A97 QBF is limited and one cannot do very much with A97 reports w/o using a query. Yes, a filter can be set but reports either have to be built on a single table or query. They cannot be built on a set. To do that, a query is needed. I suppose, in a sense creating a query is similar to creating a set in that something has to be created. However, a query is limited (isn't that the purpose of a query?) whereas a set is much more flexible.

                  I like both ways of creating a prompt. There are times when quick and easy is needed and times when more customization is desired. This speaks to the power of Alpha 5 and the overall ease of Xbasic.

                  kenn
                  TYVM :) kenn

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

                  Comment


                    #10
                    RE: Help on a Query [Old Guy]

                    Tom,

                    I couldn't agree with you more. A5 is much more flexible than Access, at least at my level of expertese. The QBF and Reports have left Access in the dust. A97 QBF is limited and one cannot do very much with A97 reports w/o using a query. Yes, a filter can be set but reports either have to be built on a single table or query. They cannot be built on a set. To do that, a query is needed. I suppose, in a sense creating a query is similar to creating a set in that something has to be created. However, a query is limited (isn't that the purpose of a query?) whereas a set is much more flexible.

                    I like both ways of creating a prompt. There are times when quick and easy is needed and times when more customization is desired. This speaks to the power of Alpha 5 and the overall ease of Xbasic.

                    kenn
                    TYVM :) kenn

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

                    Comment


                      #11
                      RE: Help on a Query [Old Guy]

                      Need to thank all of you for your interest and responses.

                      What you all agree upon points to the implemention of Xbasic (source code by any other name)and THAT's the part of this learning curve I'm really struggling with.

                      You see, I'm taking an A4v6 application that I personally use daily and trying to duplicate it in A5. I have accumulated 1266 records in a customer database with subject birthday, wife's birthday, and anniversary dates. The report in a4v6 uses simply 'or' sorts on all three fields equaling a character(of course) variable. Somehow, a4v6 seems INCREDIBLY EASIER! and has worked flawlessly for over 8 years.

                      You guys should see the results, skips, and misses I'm getting with the 'stock' A5 sorts.

                      Thanx again and I'm giving this one more week before it goes back on the shelf.

                      Ken

                      Comment


                        #12
                        RE: Help on a Query [Old Guy]

                        Zip it up, the A5 version, and attach it. Someone may be able to spot something or offer better help.
                        There can be only one.

                        Comment


                          #13
                          RE: Help on a Query [Old Guy]

                          O.K. Guys............. Here's what happened.

                          I declared a global variable 'Monum" [month number] as 'Character'; prompted for it; and then did the

                          (month(date)=val(monum).or.month(date2)=val(monum).or.month(date3)=val(monum))

                          Just as I would have one in a4v6 and it works perfectly -- just have to figure out how to get the $#@!@# report to page properly.........

                          Thanx again all - I think I've learned something.

                          Ken

                          Comment


                            #14
                            RE: Help on a Query [Old Guy]

                            Ken,

                            1. I also used A4v6 for quite some time before switching. Loved it. A4 has to be the best DOS database ever developed!! Perhaps the best way to learn A5 is to "forget" A4. It sounds dumb but A5 is a different breed of animal. Don't even try to think out how to do something in A5 using A4 as a basis. Been there, done that.

                            2. Can you copy the tables and or sets involved to a folder and zip the folder with Winzip and attached it to your next message? The instructions are on the bottom of this message box. There are several who will take a look at your problem and offer suggestions, etc. They've been "life savers" for me.

                            Giving up? Wanted to do that a few times myself. Then I got to thinking about the alternative (Access-Ugh) and the fantastic folks on this message board. It was a 'no brainer' decision. I'm glad I stuck it out. Perseverance will pay off big time for you. Stay with us and we'll stay with you!! Kind of like the three Muskateers slogan, "One for all and all for one!!" Can't think of a better way to describe the folks on this board.

                            kenn
                            TYVM :) kenn

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

                            Comment

                            Working...
                            X