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

How to add a check list of attributes to your application

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

    How to add a check list of attributes to your application

    Kevin Donaher-Ring, a fellow Alpha newbie, posted "Choosing attributes for a record" recently on the forum, to which Tom Cone, Jr. responded with a script to do so. Thank you Tom!

    I have extended Tom's example in the attached zip file with form, tables, and action scripts.

    Generically, Kevin's problem was assigned sports interests to students. A check list is a handy way of doing so.

    The only trick about this is to remember to require unique records for tblStudentInterest. You can do so, by clickon on the lookup tab for Interest in that table and specify an expression of "Student_Id+Interest" for the unique test.

    Screen 1
    Shows the Default XDialog form that is generated. Ugh, not very professional. Note that Alpha can not generate a form with even margins to save their collective lives! The top, bottom, left, and right margins are all different. Sloppy, sloppy. The line is extraneous if there is no text footer.
    Here's a better practice design hint: when buttons are placed at the top the dialog box, they should be left aligned, when placed at the bottom, they should be right aligned.

    Screen 2
    Shows the result of my surgery to the XDialog code. This was my first time using XDialog and I didn't like it, not one little bit. I remember several months ago making a comment on this forum, that XDialog reminded me of an old mainframe graphics package called Tell-A-Graph, that required laborious coding then executing the code repeatedly to get the appearance of a graph correct. This experience only confirmed that preliminary assessment. In my opinion, XDialog is no way to design a form. I spent over 6 hours, starting from ground zero, working on these simple changes. I was forced to use XDialog only because Alpha does not offer a CheckBox ListBox as a desktop control.

    Screen 3 and Screen 4
    Shows what professionally designed dialog screeens (MS Outlook) look like to do exactly the same thing. Notice the care and attention given to the placement of buttons and list boxes. All I can say is that I'm glad Alpha doesn't also run an auto body shop. Slam Microsoft all you want, but they are reasonably attentive to good visual design.

    Here's the XDialog code that I gave me the result I sought: simple, clean, and without the appearance of having been thrown together. I converted the Action Script that Alpha generated into In-line XBasic. A useful learning exercise may be comparing my code with that of the default.

    Code:
    'Create an XDialog dialog box to prompt for parameters.
    DIM SHARED mSelectedItems as C
    DIM SHARED varC_result as C
    auto_list_mSelectedItems = table.external_record_content_get("tblcategory","Category","Category","")
    
    temp_count = w_count(auto_list_mSelectedItems,crlf())
    DELETE a_mSelectedItems
    DIM a_mSelectedItems[temp_count] as c
    a_mSelectedItems.initialize(auto_list_mSelectedItems)
    ok_button_label = "&OK"
    cancel_button_label = "&Cancel"
    
    varC_result = ui_dlg_box("Categories ",<<%dlg%
    {xmargin=1.75,1}
    {ymargin=1,-1}
    
    {region}
    {xsize=12}{justify=left}
    <.6",.22"=ok_button_label!OK>|<.6",.22"=cancel_button_label!CANCEL>
    {endregion};
    {region}
    [.40,35mSelectedItems^$$a_mSelectedItems];
    {endregion};
    
    %dlg%)
    Bob McGaffic
    Pittsburgh, PA

    PS: I have included msgbox in the script that populates the children records to demonstrate what the code is doing. They are easily removed.
    Last edited by rmcgaffic; 05-23-2009, 04:17 PM.

    #2
    Re: How to add a check list of attributes to your application

    Originally posted by rmcgaffic View Post
    Here's the XDialog code that I gave me the result I sought: simple, clean, and without the appearance of having been thrown together. I converted the Action Script that Alpha generated into In-line XBasic. A useful learning exercise may be comparing my code with that of the default.

    Code:
    'Create an XDialog dialog box to prompt for parameters.
    DIM SHARED mSelectedItems as C
    DIM SHARED varC_result as C
    auto_list_mSelectedItems = table.external_record_content_get("tblcategory","Category","Category","")
    
    temp_count = w_count(auto_list_mSelectedItems,crlf())
    DELETE a_mSelectedItems
    DIM a_mSelectedItems[temp_count] as c
    a_mSelectedItems.initialize(auto_list_mSelectedItems)
    ok_button_label = "&OK"
    cancel_button_label = "&Cancel"
    
    varC_result = ui_dlg_box("Categories ",<<%dlg%
    {xmargin=1.75,1}
    {ymargin=1,-1}
    
    {region}
    {xsize=12}{justify=left}
    <.6",.22"=ok_button_label!OK>|<.6",.22"=cancel_button_label!CANCEL>
    {endregion};
    {region}
    [.40,35mSelectedItems^$$a_mSelectedItems];
    {endregion};
    
    %dlg%)
    Bob McGaffic
    Pittsburgh, PA

    PS: I have included msgbox in the script that populates the children records to demonstrate what the code is doing. They are easily removed.
    "tblcategory" table is missing from your example....
    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: How to add a check list of attributes to your application

      Bob

      Your attached images would be easier to see if you dropped all of the extra white space - noted by the red brush marks.....

      Noted attached examples...
      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


        #4
        Re: How to add a check list of attributes to your application

        Al,

        The code that you highlighed was for my specific application, so the code is offered for formatting purposes only. My zipped application was for the table definition used by Kevin/Tom and uses the Alpha default dialog box.

        My application uses:

        tblPerson instead of tblStudent
        tblCategory instead of tblInterest

        Person_Id, instead of Student_Id
        Category, instead of Interest

        I also changed the variable names and used the following
        mCount
        mSelected Items

        I wanted to model my application as generically as I could and achieve the same result as Microsoft Outlook.

        To restate: my zipped application shows how a check list works using an Alpha Five default dialog, and my XBasic code quoted by you, shows the changes I made to formatting to get a more polished appearance.

        Oui, your screen print is easier to read! I'd appreciate your guidance in saving screen images. I used to save them as bmp and found that they were too large. Another forum member asked me to use jpeg which I have, but with the extra white space problem you pointed out.

        Here's what I do for a a screen print attachment.
        Paste an Alpha screen into Microsoft Paint
        Cut out the section I want to display
        File>New
        Past the section I just pasted
        File>Save as a jpeg file.

        What am I doing wrong here? Your image is much better.

        Bob McGaffic
        Pittsburgh, PA
        Last edited by rmcgaffic; 05-23-2009, 06:29 PM.

        Comment


          #5
          Re: How to add a check list of attributes to your application

          Originally posted by rmcgaffic View Post
          my XBasic code quoted by you, shows the changes I made to formatting to get a more polished appearance.
          Bob

          My point is that we can't see your formatting example without the table that it is based on....

          At least it won't run for me without the table.....
          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


            #6
            Re: How to add a check list of attributes to your application

            Al,

            Here's what I will do tomorrow:

            I'll add another button to the zipped application file:
            Button1 for the default XDialog
            Button2 for the better looking XDialog.

            The fact that my code was dissonant with a pro like you suggests that this would really confuse a new user, who was my intended audience.

            Bob McGaffic
            Pittsburgh, PA

            Comment


              #7
              Re: How to add a check list of attributes to your application

              Originally posted by rmcgaffic View Post
              Here's what I do for a a screen print attachment.
              Paste an Alpha screen into Microsoft Paint
              Cut out the section I want to display
              File>New
              Past the section I just pasted
              File>Save as a jpeg file.

              What am I doing wrong here? Your image is much better.
              I think you have the attributes of the image too large.

              I usually set the size of the new image prior to pasting the actual image into it.

              I choose 10 X 10 - way too small for almost anything. But when you paste the attributes, the size of what you paste in expands the attributes. Then you only have the image without any white space.
              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


                #8
                Re: How to add a check list of attributes to your application

                Attached is a new database with two buttons:

                One which calls the default Checkbox list, and one which calls my simplified Checkbox with margins corrected and extraneous elements removed. It took way too much time to achieve the equal margins.

                Bob McGaffic
                Pittsburgh, PA

                PS: Resized screen shots are attached per Al's suggestion, much easier to view. Thanks, Al.
                Last edited by rmcgaffic; 05-23-2009, 10:08 PM.

                Comment


                  #9
                  Re: How to add a check list of attributes to your application

                  Here is the code if you want to place your buttons on the right side of your check box.

                  Code:
                  'Create an XDialog dialog box to prompt for parameters.
                  DIM SHARED vc_sel_interests as C
                  DIM SHARED varC_result as C
                  auto_list_vc_sel_interests = table.external_record_content_get("tblinterest","Interest","","")
                  
                  temp_count = w_count(auto_list_vc_sel_interests,crlf())
                  DELETE a_vc_sel_interests
                  DIM a_vc_sel_interests[temp_count] as c
                  a_vc_sel_interests.initialize(auto_list_vc_sel_interests)
                  ok_button_label = "&OK"
                  cancel_button_label = "&Cancel"
                  varC_result = ui_dlg_box("Interests",<<%dlg%
                  
                  {xmargin=1.75,1}
                  {ymargin=.80,-1.20}
                  
                  {region}
                  {xsize=43}{justify=left}
                  [.40,35vc_sel_interests^$$a_vc_sel_interests]|<.6",.22"=ok_button_label!OK>{lf=1.5}<.6",.22"=cancel_button_label!CANCEL>
                  {endregion};
                  
                  %dlg%)
                  Bob McGaffic
                  Pittsburgh, PA

                  Comment


                    #10
                    Re: How to add a check list of attributes to your application

                    Originally posted by rmcgaffic View Post
                    Oui, your screen print is easier to read! I'd appreciate your guidance in saving screen images.
                    ...
                    What am I doing wrong here? Your image is much better.
                    Bob,

                    I highly recommend FastSone's shareware Image Viewer. You can make small gifs by windowing or other methods:

                    http://www.faststone.org/

                    Do it! You'll love it!
                    Peter
                    AlphaBase Solutions, LLC

                    [email protected]
                    https://www.alphabasesolutions.com


                    Comment


                      #11
                      Re: How to add a check list of attributes to your application

                      Yep, I use faststone, its a great piece of software.

                      Comment


                        #12
                        Re: How to add a check list of attributes to your application

                        Yes it is a nice tool. I like ACDSee a little better but it ain't free!
                        Mike W
                        __________________________
                        "I rebel in at least small things to express to the world that I have not completely surrendered"

                        Comment


                          #13
                          Re: How to add a check list of attributes to your application

                          Hi Bob,
                          I am the struggling newbie you were talking about earlier. I want to select a number of items from an Xdialog box multi-check list and then have them placed in an embedded browse (child table), with each selected item as a new record in my browse - which is what I believe you are doing here.

                          However, the script/code scares the frights out of me - I haven't even attempted it yet.

                          When running your example, I'm confused by the series of little dialogue box's that appear after I have added 'interests'. I am also concerned that my previous checked selections carry forward into my next selection.

                          Has it got to be triggered by a button? Could it not be activated on entering the field within the browse?

                          In summary, I am a little bit confused as to why there isn't the option to simply instruct the multi-check list as to where to put the selected data.

                          Please don't think I am criticising your efforts, I was just hoping for a simpler route - avoiding the dreaded code!
                          Larry Gordon

                          Comment


                            #14
                            Re: How to add a check list of attributes to your application

                            Originally posted by Larry Gordon View Post
                            However, the script/code scares the frights out of me - I haven't even attempted it yet.
                            Hey, when I look at xdialog code it scares the frights out of me too.

                            Xdialog basically captures data in variables. After that you have to code the results. But you should be able to do the whole thing in action scripting. Go that route.
                            Peter
                            AlphaBase Solutions, LLC

                            [email protected]
                            https://www.alphabasesolutions.com


                            Comment


                              #15
                              Re: How to add a check list of attributes to your application

                              Larry,
                              Attached is an example of what I believe you want. I tried as much as I could to have this all under Action scripting, but I could not figure out how to process the individual choices from the xdialog, which produces a variable (vLchoices) holding the choices in a crlf() delimited list into individual records using action scripting. With Xbasic, using the for each... next function, it is short, and simple. To answer how you avoid the prior choices being passed to the next event... dim the choices variable to "".

                              Hope that helps.
                              Mike W
                              __________________________
                              "I rebel in at least small things to express to the world that I have not completely surrendered"

                              Comment

                              Working...
                              X