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

Choosing multiple attributes for a record

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

    Choosing multiple attributes for a record

    I'm an A5v9 newbie, coming from . . . wait for it . . . Paradox for DOS. For the most part, things are going very well. (It probably helps that I looked into Delphi once or twice, though I never got too far in.) However, I'm trying to achieve something, and I'm stuck. I'm sure it's because of my PdoxDOS outlook on things.

    Basically put, the application I'm developing is tracking high school exchange students. One of the things I need to keep in each student's record is the hobbies and sports that student is interested in. (This is to help match a student to a potential host family -- being able to search for a student interested in a particular hobby is a huge help.)

    The various hobbies and sports are kept in a table with two fields -- one is the interest itself, and the second is the category (Sport, Musical, or Other) that the interest belongs to. A table is used because at least once a year we come across an interest or hobby we've never heard of before. It's much easier to simply add a record to a table than it is to re-design a form, etc.

    In PdoxDOS, I had a child table that contained two fields -- the StudentID and the Interest. It was a 1:M relationship, with multiple interest records for each student ID.

    I populated that child table by scanning (a Paradox function that iterates through every record in a table) the interests into a Dynamic Array (an array with an alpha index whose size can grow and shrink as necessary) and presenting the choices to users performing data entry in a dialog box. The users simply selected the appropriate interests, and the selected interests were then entered into individual records in the child table.

    I'm not married to the idea of a child table in A5. It could just as easily be a memo field in the student record, with each interest enumerated, separated by commas. That's simply a structure question. (Though the child table might still be the best approach for querying on multiple interest matches.)

    Where I'm falling down is how to present the choices to the user, and how to get those choices into either the student record or a child table.

    Any pointers (including one liners to look at such-and-such a function) would be greatly appreciated.

    #2
    Re: Choosing multiple attributes for a record

    1. child table is a good idea
    2. field rule table lookup to build and select the list

    Look at Alphasports and the invoice line table and how items from the product list are chosen.
    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: Choosing multiple attributes for a record

      Thanks, Al, I'll take a look at that as soon as I can.

      Comment


        #4
        Re: Choosing multiple attributes for a record

        Al,

        Is there any easier way to accomplish this than clicking on each line and selecting the interest from the Lookup list.

        What I was hoping for was something like the following:

        1. A browse on my form of all available interests with a checkbox beside the interest description.

        2. The user would check those entires that pertained to the student

        3. The child records would somehow be created.

        Another way of doing this might be something like this:
        Student_Id
        Interest1 (Y/N)
        Interest2 (Y/N)
        Interest3 (Y/N)
        etc.

        This might reduce the storage space required, but my problem is that Alpha does not, to my knowledge, permit an inverted browse: that is one in which the columns become the rows, essentially creating a checklist.

        I know this could be built by placing a type-in field for each interest on the form, but I was hoping for a way that would minimize form maintenance if the interests subsequently changed.

        I am generally fairly happy with the Alpha Browse and even though ComponentOne offers an ActiveX control to do what I want, I am unwilling to give up Alpha's databinding.

        So let me rephrase the issue: is there a easier way of creating a check list. I know that Alpha Five has a XDialog control:

        Code:
        Check Box-List Box Control
        
        A check box-list box is a control type that displays a list of choices in a list box. Each entry has a check box to the left of the entry.   The user can select multiple entries in the list box by checking the check box for each entry that he wants to select.
        
        The check box-list box control would be useful, for example, if you want to prompt the user for a list of fields in which to perform a search.
        
        You can turn a list box into a check box-list box, by changing the '^#' directive to '^$', or '^$$'.
        I would like the checkbox list box to appear on my form, not to be a dialog window which is what the code for the documentation illustrates. Can this be done on a desktop form without resorting to a dialog window?

        I am also concerned that the check-box list box control is creating a text string either of TTT's and spaces or an enumeration of individual values such as Purple, Green, Yellow. Is there code to convert the values in this string to either child records or if a single parent record is used, make each T a Y, and each space a N in individual fields in the parent record.

        Where have you seen this functionality before? The contact record for Microsoft's Outlook -- just click on the Categories button.

        Bob McGaffic
        Pittsburgh, PA
        Last edited by rmcgaffic; 05-19-2009, 09:59 PM.

        Comment


          #5
          Re: Choosing multiple attributes for a record

          Wow...you guys just saved me a long drawn out explanation of what I need. I am looking to do the exact same thing Bob has explained above but in a different context.

          Thanks for saving me some time:)!!!
          Tony

          Comment


            #6
            Re: Choosing multiple attributes for a record

            Bob:

            YES! That's pretty much exactly what I was talking about. It's basically how I have it presented in PdoxDOS, though I think I have it where the user can simply select multiple items in a list (could be having memory fade, though, and I'm not at the office so I can't check the old app right now). I can't seem to figure out how to do something of this nature in Alpha Five.

            Comment


              #7
              Re: Choosing multiple attributes for a record

              I think I may have figured something out. I am playing with the embedded dialog supercontrol using a checkbox listbox. So far it does exactly what we are looking for. However, I have not done much with it yet so there will probably be some snags.

              T

              Comment


                #8
                Re: Choosing multiple attributes for a record

                Guys,

                Here's another way to accomplish the same objective:

                Your form displays two lists:

                Available Interests
                Baseball
                Basketweaving
                Football
                Tennis

                Selected interests
                Soccer
                Squash

                Between the two lists are two buttons for < and for >. Come to think of it, make that four buttons:

                <<
                <
                >
                >>

                The idea is that you click on an item in Column A, click on >, and it moves to column B.

                You can also remove an item by selecting it from Column B, click on <, and it moves back to column A.

                Surely this is a design pattern is doable using Alpha Five. Anyone have any code samples showing how this can be done.

                For me, the issue is not simply writing a text variable string to a character or memo field, but parsing out those concatenated values into individual fields.

                In other words, I may need to quickly find all students with an interest in Soccer. I don't want to do substring searches to find the word Soccer. Rather I want a logical field called Soccer or a child record with a value of Soccer.

                Alpha's Check Box - List Box examples are great as is its ActionScript for Display an XDialog box, but they leave me hanging -- what am I supposed to do with the resulting text string.

                Bob McGaffic
                Pittsburgh, PA

                PS: Here's a link to do this with Microsoft Access
                http://www.tek-tips.com/faqs.cfm?fid=6326

                Code:
                Here are two methods to create the functionality similar to the form wizard where you can move selected items between list boxes, or move all items between list boxes.  
                
                The first example uses a a class module the second uses a standard form module.  The class module only requires the user to write 6 lines of code because all functionality is encapsulated in the class.  The form module requires the user to include a new table and modify the list box rowsources.
                
                The code works with multi column listboxes, multiselect listboxes, and list boxes built on a value list or query.
                Does anyone know of XBasic code to do the same thing in the interest of not reinventing the wheel?

                Here's another link from Microsoft itself, the code looks easier than the above.
                http://support.microsoft.com/kb/177117
                Last edited by rmcgaffic; 05-19-2009, 11:17 PM.

                Comment


                  #9
                  Re: Choosing multiple attributes for a record

                  Here's an example I've cobbled together that assumes the selected "interests" have been obtained from the user and stored in a crlf-delimited string. The script "pop_child_recs" shows how to iterate through the string creating separate records for each interest. Hope this helps.

                  -- tom
                  Last edited by Tom Cone Jr; 05-20-2009, 05:17 AM.

                  Comment


                    #10
                    Re: Choosing multiple attributes for a record

                    Originally posted by Tom Cone Jr View Post
                    Here's an example I've cobbled together that assumes the selected "interests" have been obtained from the user and stored in a crlf-delimited string. The script "pop_child_recs" shows how to iterate through the string creating separate records for each interest. Hope this helps.

                    -- tom
                    Tom
                    Nice work (again) :D
                    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: Choosing multiple attributes for a record

                      Bob (and others),
                      I have seen "multiple" ways to do as you want, all provided in samples here on the messageboard....even the dual list box Bob referred to in his last post. I am out of time to even search my own help file in which I know I have these samples. Do a search for them. I will check back here later today and locate the ones I have if need be.

                      But yes Bob, "Surely this is a design pattern is doable using Alpha Five." And with a lot less code than that first Access link you provided.

                      Even a browse with a logical checkbox field for the "interests" would suffice I imagine. Bring up the Student wanted, Select one or more from the "Interests" browse and then assign the interests to the student....how to store these values is another issue, but as has been stated, even a memo field could be used.
                      Mike
                      __________________________________________
                      It is only when we forget all our learning that we begin to know.
                      It's not what you look at that matters, it's what you see.
                      Henry David Thoreau
                      __________________________________________



                      Comment


                        #12
                        Re: Choosing multiple attributes for a record

                        Mike,

                        I've been searching (advanced search) and I can't find the examples you mention. I'm probably not putting the correct criteria into the search.

                        I love the two-column approach, though checkboxes would be just as welcome.

                        I will keep searching, of course.

                        --Kevin

                        Comment


                          #13
                          Re: Choosing multiple attributes for a record

                          Kevin,

                          I searched over my lunch hour and also came up with nothing. I did a good search on "move list box to list box" and came up with lots of hits for Microsoft Access. But nothing for Alpha Five on this forum or on the web.

                          But the same search on Google returned our thread!

                          Hopefully, some veteran user can suggest alternative search terms or links to these alternatives.

                          Bob McGaffic
                          Pittsburgh

                          Comment


                            #14
                            Re: Choosing multiple attributes for a record

                            I have found my solution (I think).

                            I wanted my users to be able to add custom search criteria for exercises. I have several programmed in such as "implement used" where they can check off the thing/s used during the exercise (dumbbells, physioball, for example)

                            So, I have set up 4 "user defined criteria" boxes (frames) in my criteria check box area. There are 10 checkboxes inside each frame area. Beside each checkbox I have a button I have formatted to look like underlined plain text (therefore it looks like a text label beside the checkbox.

                            I have created a table that stores the names of each custom search criteria.

                            I have created a separate record for each button in this table that contains a uid and the text to be displayed in the button.

                            When my exercise form loads, it fetches through the table containing the names for the user defined criteria and writes it to the text of each button.

                            If a user wants to change the "text/label" they click on it (since it is a button that looks like a label) and enter the new name. It then writes the new name to the button and changes the entry in the table containing the names for the custom search criteria.

                            I have also included a hotspot over the text in the frame that when clicked allows the user to change the text for the frame. This value is also stored in my custom search criteria table.

                            It appears to work well...for now.
                            T
                            Last edited by reynolditpi; 05-20-2009, 07:03 PM.

                            Comment


                              #15
                              Re: Choosing multiple attributes for a record

                              Tony,

                              A picture is worth a 1000 words. Your description would be easier to visualize with a screen print.

                              Thanks,

                              Bob McGaffic
                              Pittsburgh

                              Comment

                              Working...
                              X