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

Creating checkboxes on the fly in a grid

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

    Creating checkboxes on the fly in a grid

    Hi all,

    I am a newbie to Alpha5 (purchased the product today,actually).

    So I have three sample tables (ignoring IDs or keys for simplicity):

    Peope
    Bob
    Peter
    Mary

    ShirtColours
    Blue
    Red
    Yellow
    Green
    Pink

    People_LINK_Colours
    Bob->Red
    Bob->Green
    Bob->Pink


    While editing Bob's preferences, for example, I need to display all possible colours (as checkboxes) in the rows of an update-able grid, and with Bob's favourites checked. I have not yet investigated XBasic, and it seems to me that code may be required. I wish to be able to check and uncheck any of the possible colours, and click submit to save the changes.

    If anyone has the time, I would love someone to show me the way on this one - maybe post a sample showing this?

    I will probably need to do the same for radio buttons - maybe it will be similar to the checkboxes.

    Thanks for your help,
    Andy.

    #2
    Re: Creating checkboxes on the fly in a grid

    Here's one approach to the issue. MultiCheckbox.zip

    Unzip into a new directory and open the database - enter new people with a name and then click the colors.

    It's not the data structure that you listed, but could be expanded to use the linking table too.
    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


      #3
      Re: Creating checkboxes on the fly in a grid

      Thanks Al,
      Nice work with the Desktop App. But I am at a loss how this works within a Web App grid like the one I wish to build.
      Thanks,
      Andy.

      Comment


        #4
        Re: Creating checkboxes on the fly in a grid

        Originally posted by agillbb View Post
        Thanks Al,
        Nice work with the Desktop App. But I am at a loss how this works within a Web App grid like the one I wish to build.
        Thanks,
        Andy.
        Use the same design.

        Build a grid on the people table

        add name, colors to the grid

        change the color field to a checkbox - define the values from the colors table

        It's much easier on the web side than on the desktop side.chkboxcolors.png

        Here is the sample again with both.MultiCheckbox_WAS_and_Desktop.zip
        Last edited by Al Buchholz; 08-23-2011, 10:02 PM.
        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


          #5
          Re: Creating checkboxes on the fly in a grid

          Thanks again Al,

          My first time looking at checkboxes - you helped show me the Alpha-obvious. My problem was that I was thinking like a php programmer (loops and stuff), forgetting that Alpha had simplified it already.

          But I am still getting a bit hung up on something. If I add a table that represents Shirt Type:

          People
          Bob
          Peter
          Mary

          ShirtType
          Tshirt
          Blouse

          Colours
          1 Tshirt->Blue
          2 Tshirt->Red
          3 Tshirt->Yellow
          4 Tshirt->Green
          5 Tshirt->Pink
          6 Blouse->Red
          7 Blouse->Green

          People_LINK_Colours
          Bob->2
          Bob->4
          Bob->5
          Bob->7
          Mary->6


          Now, for each person listed in a main grid, I wish to see a child grid that lists all possible shirt types in the rows, and all possible corresponding colours (as checkboxes) as the column entry.

          e.g.

          a5test.jpg


          Thanks again for you great help.
          Andy.

          Comment


            #6
            Re: Creating checkboxes on the fly in a grid

            You're welcome for the help.

            I got you going on this, but too busy to write an application for you pro bono.

            If you have small specific questions you'll find help here, but most of us do this for a living.

            Perhaps someone else can take this over.
            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


              #7
              Re: Creating checkboxes on the fly in a grid

              Hey Al,
              Not hunting for a freebee. It's just that you made it look soo easy that I thought maybe there was an easy bit to the additional table. I suspect what you're saying is that there may be a bit more to it, so I'll give it a bigger try, do some research and see what happens.
              Thanks,
              Andy.

              Comment


                #8
                Re: Creating checkboxes on the fly in a grid

                No problem. We like to get people going on the right track but not take away all of the fun.....
                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


                  #9
                  Re: Creating checkboxes on the fly in a grid

                  Al,
                  Sorry to bug you. Direct quick question: In your "people" table, it seems as if you have 2 fields (linking people to colors), but the color field has in multiple entries like "RedGreenPink". I don't understand how this works - no delimiters or anything. I am used to MS Access and reasonably well normalised tables - and even then you wouldn't dare use delimited values in a field unless you had a very good reason to. Is this multi-value approach unique to DBF? Is the multi-value being created by your xdialog "checkbox" code?
                  Thanks,
                  Andy.

                  Comment


                    #10
                    Re: Creating checkboxes on the fly in a grid

                    Originally posted by agillbb View Post
                    Al,
                    Sorry to bug you. Direct quick question: In your "people" table, it seems as if you have 2 fields (linking people to colors), but the color field has in multiple entries like "RedGreenPink". I don't understand how this works - no delimiters or anything. I am used to MS Access and reasonably well normalised tables - and even then you wouldn't dare use delimited values in a field unless you had a very good reason to. Is this multi-value approach unique to DBF? Is the multi-value being created by your xdialog "checkbox" code?
                    Thanks,
                    Andy.
                    the values are crlf() separated.

                    Yes it's not 'normalized'. Probably not even in the 1st degree.

                    But works is the best....

                    Code can be written to coordinate this structure with a normalized table...

                    This isn't a 'feature' of dbfs. Access and dbfs are separated by a similar base.
                    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


                      #11
                      Re: Creating checkboxes on the fly in a grid

                      Thanks Al,

                      That explains the mystery. Hopefully, this approach doesn't limit our SQL querying ability which will (I guess) have to use the "CONTAINS" or "IN" operators instead of "=" when queries are based on checkbox values.

                      Your help is much appreciated.
                      Andy.

                      Comment


                        #12
                        Re: Creating checkboxes on the fly in a grid

                        Originally posted by agillbb View Post
                        Thanks Al,

                        That explains the mystery. Hopefully, this approach doesn't limit our SQL querying ability which will (I guess) have to use the "CONTAINS" or "IN" operators instead of "=" when queries are based on checkbox values.

                        Your help is much appreciated.
                        Andy.
                        Or you can write a stored procedure to keep a normalized table in sync.
                        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

                        Working...
                        X