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

Multi select

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

    Multi select

    I have a desktop app that uses an xdialog box to display queried records from a table. The user multi selects items and these items are inserted into a transaction table.

    Its like an invoice system where you can multi select multiple items from a pop up window and insert them into the detail table of an invoice.

    I'd like to know if such a thing is possible at the web level where the items displayed in the queried in the pop up dialog box/component and the user can multiselect items and insert into a detail table.

    The actual use is for a medical ordering system where a user can select muliple items to 'order'
    Creating Healthcare Work-Flow Solutions Since 2005

    #2
    Re: Multi select

    I'll stick my neck out and say, sure. But I haven't done this myself. Obvioulsy you can query a grid or display a 2nd queried grid. Grids can have optional check boxes (not fields) for the purpose of selection. Just not sure how you control program flow after checking the records you want.
    Peter
    AlphaBase Solutions, LLC

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


    Comment


      #3
      Re: Multi select

      It's very much possible.
      I've done this for a financial web app I built in V10.

      That said, this is where solid knowledge of Javascript and Alpha's event model pay a big dividend.
      Bob Moore


      Comment


        #4
        Re: Multi select

        Originally posted by Peter.Greulich View Post
        I'll stick my neck out and say, sure. But I haven't done this myself. Obvioulsy you can query a grid or display a 2nd queried grid. Grids can have optional check boxes (not fields) for the purpose of selection. Just not sure how you control program flow after checking the records you want.
        I would be interested to know the javascript version, but it's actually fairly easy when using an Ajax callback function that does not need any javascript.

        1. Define a row based button or a grid toolbar button on the grid. Set the 'Has checkbox select column' property of the grid to true
        2. In the button onclick() define a js action script for an Ajax callback named, say, 'ProcessSelected'
        3. Define the Ajax callback in the grid and make sure the function's interface is as expected, i.e.
        Code:
        function ProcessSelected as C (e as P)
        ... 
        end function
        4. In the Ajax callback function you can now access the key values of the selected rows and execute some xbasic to add them to a transaction table or similar. The following example assumes you have a table in an SQL DB with a compound primary key (lastname, firstname):

        Code:
        function ProcessSelected as C (e as P)
        
           dim js as C  
           dim i as N
           dim selectedCount as N
        	
           dim lastname as C
           dim firstname as C
        
           'Get number of selected records
           [B][COLOR="Blue"]selectedCount = e.checkboxRows.countChecked[/COLOR][/B]
        
           'Process key field values of selected rows
           for i=1 to [B][COLOR="blue"]selectedCount[/COLOR][/B]
              'Assuming that lastname is the first part of primary key 
              [B][COLOR="Blue"]lastname = eval("e.checkedRows.key" + i + "[1]")[/COLOR][/B]
              'Assuming that firstname is the second part of primary key 
              [COLOR="blue"][B]firstname = eval("e.checkedRows.key" + i + "[2]")[/B][/COLOR]
             
              'do something with the key values, i.e. add them to a
              'transaction table, retrieve other fields etc. using
              'regular xbasic code/SQL etc.
              '...
        
           next
        
           'Generate javascript code or just empty string	
           js="alert('Selected Records Processed');"
        
           ' Return javascript code to be executed after callback (optional)
           ProcessSelected  = js
        
        end function
        regards

        Wolfgang

        Comment


          #5
          Re: Multi select

          Wolfgang,

          That is very, very helpful. This is exactly the kind of useful and explanitory example that Alpha needs to provide much, much more of. Thanks!
          Peter
          AlphaBase Solutions, LLC

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


          Comment


            #6
            Re: Multi select

            Wolfgang,

            I couldn't agree more with Peter! Thank you for sharing!!!!

            Regards,

            Jeff

            Comment


              #7
              Re: Multi select

              Wolfgang,

              THANKS! There is now way in the world I would have figured that out! Thanks for the detailed example and your time providing it!

              regards,
              omar
              Creating Healthcare Work-Flow Solutions Since 2005

              Comment


                #8
                Re: Multi select

                You would probably want the next action in the button onClick handler to close the grid or popup, and you might use the option to update the parent grid when the linked grid closes. You would also want to add some error checking to the callback function.

                Comment


                  #9
                  Re: Multi select

                  Originally posted by mheller View Post
                  You would probably want the next action in the button onClick handler to close the grid or popup, and you might use the option to update the parent grid when the linked grid closes. You would also want to add some error checking to the callback function.
                  Martin,

                  Would it be possible for you to provide the code to do that? As someone just getting going on the web side of things with Alpha -I think it would prove helpful to many here.

                  Regards,

                  Jeff

                  Comment


                    #10
                    Re: Multi select

                    Originally posted by jkletrovets View Post
                    Martin,

                    Would it be possible for you to provide the code to do that?
                    That's what we need. Concept may be useful, nut and bolts, critical.
                    Peter
                    AlphaBase Solutions, LLC

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


                    Comment


                      #11
                      Re: Multi select

                      I'd love to walk you through it, but I won't have time to do that until March. Sorry.

                      I don't think it will require code, just a box checked and another Action JavaScript step.
                      Last edited by mheller; 02-15-2010, 11:56 AM. Reason: clarification

                      Comment


                        #12
                        Re: Multi select

                        perhaps wolfgang should be on the payroll. :D

                        Chad
                        Chad Brown

                        Comment


                          #13
                          Re: Multi select

                          Originally posted by chadbrown View Post
                          perhaps wolfgang should be on the payroll. :D

                          Chad
                          Chad (and all)

                          thanks for the good words. The payroll is an interesting thought ... black money preferred .... :)

                          seriously: The questions posted in this forum by you guys are all very valuable and interesting because sooner or later, I will also be confronted with many of them.

                          Actually, the checkbox select column is described in the help, just not 100% clear and done to the end. So I thought I can only fully understand it by doing it myself.

                          My "payback", if you so will, is learning by doing and learning from solutions shared by other members of this forum, so I hope everbody keeps posting & sharing !

                          regards

                          Comment


                            #14
                            Re: Multi select

                            Originally posted by mheller View Post
                            I'd love to walk you through it, but I won't have time to do that until March. Sorry.

                            I don't think it will require code, just a box checked and another Action JavaScript step.
                            We will be waiting with baited breath in March. Thanks in Advance.
                            :)
                            Nicholas Wieland
                            LedgerSuite.com Corp
                            [email protected]
                            http://www.ledgersuite.com

                            Comment


                              #15
                              Re: Multi select

                              Ok; I inserted the function in
                              Javascript
                              - Other
                              - Javascript function declarations

                              but when I click the button in tells me it cannot find the function.

                              I Placed a button on the grid row with an ajax callback where
                              submit data is high,
                              submit part is grid,
                              row number is {Grid.RowNumber},
                              callback type InternalXBasicFunction,
                              Function Name ProcessSelected

                              Not sure how to do this either: a grid toolbar button on the grid
                              Creating Healthcare Work-Flow Solutions Since 2005

                              Comment

                              Working...
                              X