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

Dynamic Filter in Dropdown ? (It exists in lookup)

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

    Dynamic Filter in Dropdown ? (It exists in lookup)

    Is the dynamic filter used in lookups not available in a dropdown control?

    I have 1 value (client id) that needs to filter 2 dropdowns.
    Cascading dropdowns only allow 1 parent and that parent has to be a dropdown.

    Example:I have a project which has ac lient id.
    I want to add a contact and a invoice profile to this project.

    Contacts and Invoice profiles are setup by client id.
    So based on the client id for the project - i need to filter the dropdowns. I can do this with the lookup control and the dynamic filter option - but I don't quite like the lookups because I would rather not show an ID or create an extra field to be 'filled in' by the lookup.

    Dynamic filter on dropdowns would be awesome.
    Scott Moniz - Computer Programmer/Analyst
    REA Inc.
    http://reainc.net
    (416)-533-3777
    [email protected]

    REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
    If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
    contact us to discuss options.

    #2
    Re: Dynamic Filter in Dropdown ? (It exists in lookup)

    I guess I don't understand what you are trying to accomplish, but, I use lookups a lot and don't understand what you mean by having to show an ID or add an extra field. In its most basic form an Edit-Combo List lookup seems to be exactly like a dropdown.
    Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

    Comment


      #3
      Re: Dynamic Filter in Dropdown ? (It exists in lookup)

      Hi Frank.
      Maybe I am misunderstanding the lookup.
      In its most basic form - say i choose these options


      Field To Display:First Name, Last Name
      Field To Return: Contact_Id

      When I select one of the options the contact id shows up in the textbox. I mean in a 'Contact' field - the number 11 is meaningless to my client.
      Who is contact 11? I would like to show this contacts first and last name, which I can do by making a dummy field and using the lookups "fill in fields" option - but in either case the textbox with the ID would show - which I dont like, my client doesnt need to see IDs.


      Whereas a dropdown - the dropdown would have an item selected - but the user would never see the contact id - just the dispaly.

      Is this possible in a lookup? (I dont want to use a grid)

      Id prefer to use a dropdown over a lookup - and essentially I need to filter 2 dropdowns on my client id for that project.

      Your input and experience is appreciated.
      Scott Moniz - Computer Programmer/Analyst
      REA Inc.
      http://reainc.net
      (416)-533-3777
      [email protected]

      REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
      If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
      contact us to discuss options.

      Comment


        #4
        Re: Dynamic Filter in Dropdown ? (It exists in lookup)

        OK, I see now, I was wrong, it is not quite like a combobox. You would have to have a field to accept the Contact Name.

        With today's cheap storage and fast databases I quit using conmbo boxes in that fashion and I just added the var char field. It makes it easier for me when I browse the tables with navicat. Like you said "Who is contact 11?" I don't have to build views. It also makes dynamic dropdowns easier. Just lazy I guess.

        Maybe you could have a hidden dropdown with a default value set to what you need.
        Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

        Comment


          #5
          Re: Dynamic Filter in Dropdown ? (It exists in lookup)

          I cant do things that way.
          I like to design stuff properly.
          But in the situation like th following

          client
          ---------------
          client_id
          other_fields

          contact
          ---------------
          contact_id
          client_id
          first_name
          last_name
          address
          phone1
          phone2
          phone3
          fax
          email
          active

          project
          ------------------
          project_id
          client_id
          main_contact_id (references contact.contact_id)


          I cant just change main_contact_id here to all the fields from the contact table. I have a grid Client with a child grid Contact. Contacts are managed by client and then referenced in projects. If a contact is the main contact for 50 projects and his phone number changes - I would have to fix 50 records instead of just 1.


          :( Predicament. I know Ive done this before with some pretty CRAZY javascript work arounds. There must be an easier way.
          Scott Moniz - Computer Programmer/Analyst
          REA Inc.
          http://reainc.net
          (416)-533-3777
          [email protected]

          REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
          If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
          contact us to discuss options.

          Comment


            #6
            Re: Dynamic Filter in Dropdown ? (It exists in lookup)

            I dont think dynamic dropdowns filtered based on a grid row field is possible in alpha. I know you can filter a dropdown based on a session variable - but I dont think you can it based on a grid variable.
            Scott Moniz - Computer Programmer/Analyst
            REA Inc.
            http://reainc.net
            (416)-533-3777
            [email protected]

            REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
            If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
            contact us to discuss options.

            Comment


              #7
              Re: Dynamic Filter in Dropdown ? (It exists in lookup)

              I like to design stuff properly, too.

              Here is the difference in the way I would create my tables.

              client
              ---------------
              client_id
              other_fields

              contact
              ---------------
              contact_id
              client_id
              first_name
              last_name
              address
              phone1
              phone2
              phone3
              fax
              email
              active

              project
              ------------------
              project_id
              client_id
              main_contact_id - gets filled in with the lookup
              main_contact_name - Accepts the First and last name from the lookup for display.

              Why is that not properly designed?
              Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

              Comment


                #8
                Re: Dynamic Filter in Dropdown ? (It exists in lookup)

                I've got lots and lots of Edit-Combos in my project, and I really like them. I'm not totally sure this will help, but may get you thinking slightly differently.

                In these grids, I have a SQL Select like

                Code:
                SELECT invoice.*, customer.* FROM invoice LEFT OUTER JOIN customer ON invoice.Inv_CustID = customer.CustID WHERE... ORDER BY...
                Note that no dummy fields are involved. In the Primary Keys selection, I usually set the customer table as read-only--this allows it to appear to be editable in the editable Grid or Detail View but it's actually not changing in the tables.

                In the editable Grid row or Detail View, I display the customer.Cust_Name field. This is an Edit-Combo lookup, searching for and returning the customer name for display but also filling in the invoice.Inv_CustID field with the customer.CustID. The invoice.Inv_CustID field is almost always a hidden field-nobody even knows this field exists but the record has full relational integrity--If I change that customer's name in the customer table it will not screw up anything in my invoice database and will display correctly in this grid the next time I open the record.

                As an aside, I've learned that you can fill-in a hidden dropdown box, which may help provide some of the dynamic filtering for lower-level dropdowns.

                Comment


                  #9
                  Re: Dynamic Filter in Dropdown ? (It exists in lookup)

                  Originally posted by frankbicknell View Post
                  Why is that not properly designed?
                  The short answer is duplication of data. Contact name exists in your contact record so it shouldnt exist in your project record.
                  But lets agree to disagree - whatever works for you.
                  Scott Moniz - Computer Programmer/Analyst
                  REA Inc.
                  http://reainc.net
                  (416)-533-3777
                  [email protected]

                  REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
                  If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
                  contact us to discuss options.

                  Comment


                    #10
                    Re: Dynamic Filter in Dropdown ? (It exists in lookup)

                    Originally posted by christappan View Post
                    I've got lots and lots of Edit-Combos in my project, and I really like them. I'm not totally sure this will help, but may get you thinking slightly differently.

                    In these grids, I have a SQL Select like

                    Code:
                    SELECT invoice.*, customer.* FROM invoice LEFT OUTER JOIN customer ON invoice.Inv_CustID = customer.CustID WHERE... ORDER BY...
                    Note that no dummy fields are involved. In the Primary Keys selection, I usually set the customer table as read-only--this allows it to appear to be editable in the editable Grid or Detail View but it's actually not changing in the tables.

                    In the editable Grid row or Detail View, I display the customer.Cust_Name field. This is an Edit-Combo lookup, searching for and returning the customer name for display but also filling in the invoice.Inv_CustID field with the customer.CustID. The invoice.Inv_CustID field is almost always a hidden field-nobody even knows this field exists but the record has full relational integrity--If I change that customer's name in the customer table it will not screw up anything in my invoice database and will display correctly in this grid the next time I open the record.

                    As an aside, I've learned that you can fill-in a hidden dropdown box, which may help provide some of the dynamic filtering for lower-level dropdowns.
                    Hey chris,
                    I was aware of this, but it doesnt satisfy my needs. I am left with the same issue. Basically I just have to use a lookup - and fill in non-updateable fill in field. Not what I was going for, but, Im going to have to settle for now.

                    Thanks for your assistance
                    Scott Moniz - Computer Programmer/Analyst
                    REA Inc.
                    http://reainc.net
                    (416)-533-3777
                    [email protected]

                    REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
                    If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
                    contact us to discuss options.

                    Comment


                      #11
                      Re: Dynamic Filter in Dropdown ? (It exists in lookup)

                      Originally posted by aburningflame View Post
                      The short answer is duplication of data. Contact name exists in your contact record so it shouldnt exist in your project record.
                      But lets agree to disagree - whatever works for you.
                      I am not trying to be self righteous, I am merely trying to learn. I meant that question literally. I always want to learn better methods for handling data. I have read many publication regarding data structure and what you have said is the general consensus.

                      What I don't understand (probably because I am an Engineer not an Analyst) is what is gained by not having that extra field in a table. Is it not noticeable to me because I am dealing with only thousands of records and not millions?
                      Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                      Comment


                        #12
                        Re: Dynamic Filter in Dropdown ? (It exists in lookup)

                        Originally posted by frankbicknell View Post
                        I am not trying to be self righteous, I am merely trying to learn. I meant that question literally. I always want to learn better methods for handling data. I have read many publication regarding data structure and what you have said is the general consensus.

                        What I don't understand (probably because I am an Engineer not an Analyst) is what is gained by not having that extra field in a table. Is it not noticeable to me because I am dealing with only thousands of records and not millions?
                        You are complying with standards set by database engineers. Lookup database normalization.

                        Say you had 200,000 records, you have a contact first/last name field in your contact table and a contact name field in your project table. That means you are storing an extra 200,000 pieces of data.

                        Also, in your case, if the name on the contact record changed - the name on the project record would not - leading to data that is not integral.

                        Basically what you gain is - less storage space (although in small systems this may mean nothing - in larger systems this could highly affect speed of queries etc etc) and you eliminate the possibility of inconsistent/un-integral data.

                        I am not arguing - you design your way, I design my way.
                        But those are the points - take from it what you will.

                        Thanks for your input - I will post a screenshot of what I was doing in a bit.
                        Scott Moniz - Computer Programmer/Analyst
                        REA Inc.
                        http://reainc.net
                        (416)-533-3777
                        [email protected]

                        REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
                        If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
                        contact us to discuss options.

                        Comment


                          #13
                          Re: Dynamic Filter in Dropdown ? (It exists in lookup)

                          Thanks for the response. I will ponder that for a while. Who knows someday I may have hundreds of thousands of customers. Hey, it could happen.
                          Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                          Comment


                            #14
                            Re: Dynamic Filter in Dropdown ? (It exists in lookup)

                            Originally posted by aburningflame View Post
                            You are complying with standards set by database engineers. Lookup database normalization.

                            Also, in your case, if the name on the contact record changed - the name on the project record would not - leading to data that is not integral.
                            While database normalization is good, the needs of the application trump normalization.

                            ie, retaining the history of what the contact name was at the time of the transaction. Marriage, divorce, aliases, corporate buyouts etc - can be tracked and linked by using an id field from the contact table.

                            Normalize till it hurts - De-normalize till it works.
                            Database Standards - another entry for oxymoron list...

                            I think the definitive answer will be available - tomorrow.. ;)
                            Al Buchholz
                            Bookwood Systems, LTD
                            Weekly QReportBuilder Webinars Thursday 1 pm CST

                            Occam's Razor - KISS
                            Normalize till it hurts - De-normalize till it works.
                            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                            When we triage a problem it is much easier to read sample systems than to read a mind.
                            "Make it as simple as possible, but not simpler."
                            Albert Einstein

                            http://www.iadn.com/images/media/iadn_member.png

                            Comment


                              #15
                              Re: Dynamic Filter in Dropdown ? (It exists in lookup)

                              Originally posted by Al Buchholz View Post
                              While database normalization is good, the needs of the application trump normalization.

                              ie, retaining the history of what the contact name was at the time of the transaction. Marriage, divorce, aliases, corporate buyouts etc - can be tracked and linked by using an id field from the contact table.

                              Normalize till it hurts - De-normalize till it works.
                              Database Standards - another entry for oxymoron list...

                              I think the definitive answer will be available - tomorrow.. ;)
                              I understand that. I have some tables where retaining the data is not necessary and it was just easier for me to add an extra field for the lookups. I just want to make sure that I don't break any rules and get banned from the club and have to use flat files or something.
                              Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                              Comment

                              Working...
                              X