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

Filter records on a form - user selected

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

    Filter records on a form - user selected

    Im creating a filter on records using a form.
    I would like to create an option to filter using two fields - name and year - but I would like the user to be able to select the year and the name.
    I am using the actions in the query section.

    Essentially I require a two step query using drop down boxes where users selects name and year which then go on to query the results.

    #2
    Re: Filter records on a form - user selected

    Form
    ..Query Genie
    ...Select Fields
    ....Specify a Field Value from the Form
    .....Save the Query
    .......Add the Query to a Button using Action Scripting
    .........Press Button

    Alternatively, search Dynamic Tree on the Forum. There are a few examples and they work brilliantly.
    See our Hybrid Option here;
    https://hybridapps.example-software.com/


    Apologies to anyone I haven't managed to upset yet.
    You are held in a queue and I will get to you soon.

    Comment


      #3
      Re: Filter records on a form - user selected

      Hi thanks for the reply but Im clearly retarded or something because I cannot find the query genie when Im in the form - Ive looked in the toolbox, supercontrols, form section on the top menu.
      I know how to create a button and then create a query based on an action but Im trying to filer records based on two fields that the user selects, they must no be predefined values.
      This is obviously possible but all I can manage to get is the filter according to a specified value which is not helpful for my purposes.
      g.PNG

      Comment


        #4
        Re: Filter records on a form - user selected

        Ok I found the query genie it was in the form view not form design.
        My problem is that I cant get the values to be filtered, to appear in a drop down box so the user can select them.
        The only option Im getting is to set a predefined value.

        For example I want the user to select a year from the drop down box currently all it does is specify a given year with no choice.
        Surely this is common functionality it can't be hard to do.

        Comment


          #5
          Re: Filter records on a form - user selected

          Steve
          1.
          Where do you want the query to appear?
          Would it be like on that YR field on the screensample whilst completing the form > or to select before you open up the form, or for a report ?? or for a user to select from to filter a browse?
          2.
          What years must be available for the user to select from? - any year ? from a table containg possible years ? filtered to certain records?.

          There are many many options - you could put a drop down list box on the form, on the fieldrules of the table, in a separate dialog.

          Comment


            #6
            Re: Filter records on a form - user selected

            With a bit of end user training query by form can be used by them to do this easily.

            Otherwise, tell us the exact sequence you'd like for the user to follow. You may be thinking of a multi-step sequence in which theuser is presented with choices for each filter component, following which your script combines them into a legal filter expression and then runs a query. Or, you may be thinking of something else entirely. More details please. There are lots of different ways this might approached.

            Comment


              #7
              Re: Filter records on a form - user selected

              Hi Ray, I would like the user to select the year and name from two drop down boxes in the actual form and then the query will be based on these inputs.
              The years available are all the years in the table (user selects a year) same for name.

              I have tried to put in drop down boxes on the form but either nothing appears when I view the form or it only allows me to select one year.

              Comment


                #8
                Re: Filter records on a form - user selected

                Hi Tom, I have two fields that I want the user to select to create the query for the form. They select a name and a year, both of these fields values come from two respective tables with this data. So a drop down box with all years and drop down box with all names then a query/filter based on these inputs generates results in the browse view (F8 when viewing the form)

                Comment


                  #9
                  Re: Filter records on a form - user selected

                  I have tried to put in drop down boxes on the form but either nothing appears when I view the form or it only allows me to select one year.
                  There's a big difference between a filter that uses a single year, and a filter that involves multiple years. More details please. Try to be specific. At times you indicate you want the filter to include a single year and a name, and now it is beginning to sound like you want to be able to filter based on a name and several years. Color me confused.

                  Comment


                    #10
                    Re: Filter records on a form - user selected

                    Originally posted by stemie View Post
                    Hi Ray, I would like the user to select the year and name from two drop down boxes in the actual form and then the query will be based on these inputs.
                    The years available are all the years in the table (user selects a year) same for name.
                    So the form you show is to be used to set a query?, that takes us back to query by form or not?
                    Do you want to present a filtered list of horses based on the year and name in a parental chain?
                    If so, that depends on your design, whether they are all in a single table.
                    I think you will get a quick answer if you submit a zipped copy of your database so we can see what you do.

                    Comment


                      #11
                      Re: Filter records on a form - user selected

                      Just when I thought I had the answer.
                      Steven, see if the attached has any value. (Might not now that you have elaborated.)
                      As Tom comments, there is a big difference between a Name in a Year, and a Name in a span of Years. It's not difficult, but the specifics need to be agreed before you get applicable suggestions I suspect.
                      Attached Files
                      See our Hybrid Option here;
                      https://hybridapps.example-software.com/


                      Apologies to anyone I haven't managed to upset yet.
                      You are held in a queue and I will get to you soon.

                      Comment


                        #12
                        Re: Filter records on a form - user selected

                        Tom, a user will view a form, they need to filter/query results by name and year. So there are two drop down boxes on the form one for name one for year.
                        When the user clicks a drop down box it lists all the values ie all the years and all the names which come from the table.

                        "At times you indicate you want the filter to include a single year and a name" - those are the only results I get when I try to do it, single year and single name, which is what I do not want.

                        Comment


                          #13
                          Re: Filter records on a form - user selected

                          Ok, maybe this screencast will get you going in the right direction.

                          http://screencast.com/t/5U1Q3VseV

                          My example does not use drop down boxes. I simply run an action script that prompts for the desired values and runs the query against the current form.

                          ----------------------

                          Later on

                          My screencast is limited to 5 minutes so I didn't get a chance to explain how the compound query was defined. Basically I let the filter builder genie do it for me. The filter expression looks for customer_id values that match the value in the variable I populated from the user selection AND records that have the selected Year value in their DATE field. The genie built the expression for me. Harder to describe than to do. However, if this is new ground for you let us know. I can do a screencast walking through this last sequence if that would be helpful.
                          Last edited by Tom Cone Jr; 11-15-2011, 09:55 AM.

                          Comment


                            #14
                            Re: Filter records on a form - user selected

                            Ray the db is 50mg big I presume thats bit large to upload here.

                            The problem I have with query by form is that is too complicated for the end user, surely there is something more simple for this simple task.
                            I want a simple user experience when they have the whole dialog box with all these other options that aren't necessary for their task, it just creates confusion.

                            Im clearly missing something because what Im asking for is surely super basic.

                            A user selects two fields to filter the results - they select the name and year from a list of all possible choices from the table or set not just one name and one year.
                            They are using a form because it is more simple for them to work with than browsing tables.
                            The form is used to add data to the database but also to check if data exists (hence the need for this query/filter)

                            Comment


                              #15
                              Re: Filter records on a form - user selected

                              Steven,

                              If your dropdown boxes are bound to the table fields, then that explains why they only contain a single field value. They're bound to the field values in the current record, only, and will never display all the field values from all the records in the table. If I've guessed correctly then beware of doing it like that. Even if you force other values to be available in the dropdown controls the mere act of selecting a value from the list will change the field value in the current record. Much better to bind the control to a variable and then populate the list dynamically. That's the approach I've taken in my example.

                              Comment

                              Working...
                              X