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

Process multi-select listbox data

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

    Process multi-select listbox data

    Attached is a zip of the test database.
    Customer set contains customer data and customer item data.
    Customer and Items are linked by customer id.

    Transaction set is used to record sales data by customer and customer item.
    Each customer item is to be listed as a line item (separate table) of the transaction table.
    Transaction table and Line Item table are linked by transaction id.

    Chosing items with the multi-select box, and displaying choices made is relatively easy.

    How do you transfer the choices from memory to variables?

    In my example, the choices are contained in 'work_list'.
    I have not (yet) been able to find a way to get the data into a workable form to create the line item list for each transaction.

    Any help will be appreciated.
    D

    #2
    RE: Process multi-select listbox data

    Richard:

    First, COMPLAINT:
    Like many people, you post a sample db, with no instructions on where to look. I assume you are referring to the single global script. My complaint is, that you make it a little hard for someone to help you. End of complaint.

    Second, SOLUTION:

    Put this code after (or instead of) your ui_msg_box:

    vListCount = w_count(work_list,crlf())
    Dim vWord[vListCount] as C
    For i = 1 to vListCount
    vWord[i] = word(work_list,i,crlf())
    traceln(vWord[i])
    next

    Then look at the trace window.

    Peter
    Peter
    AlphaBase Solutions, LLC

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


    Comment


      #3
      RE: Process multi-select listbox data

      Thanx for the reply.
      Sorry -- for the misunderstanding
      for not being more explicit
      for the fact that I still need help.

      Your solution does not solve my problem. As far as I can ascertain, putting the chosen items into an array does not allow me to use these array items.
      Obviously, I am missing something.

      To be more to the point, the procedure is:
      1)look up a customer by name
      2)chose one or more of the items using the multi-select list box.
      3) transfer each of the chosen items to global variables so that
      they can then be 'processed' individually into the sales transaction as a line item.
      4) there are other fields in the customer item table that contain data to be used in the sales transaction
      such as cost, sales tax, etc...

      So, I need to be able to 'look at' each chosen item, enter it into a new record in the
      transaction line item table, add more data from the customer item
      table, and then start totalling up the sales transaction.

      All of these things I can now do manually or if there is only one customer item
      to be processed. I need the multiple items in a form that I can use to re-access the
      customer table, the customer item table, and make new records in the transaction table
      and the transaction line item table.
      I have tried to access each 'chosen item' while in array form, but keep getting errors.
      If you can give me some idea of what I am missing and where to look, I would appreciate it.

      D

      Comment


        #4
        RE: Process multi-select listbox data

        Ok, Richard,

        I responded to item no. 3. See attached.

        When the app opens, press the red "Select" button. Let me know if this gets you going in the right direction.

        Peter
        Peter
        AlphaBase Solutions, LLC

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


        Comment


          #5
          RE: Process multi-select listbox data

          OK thanx.
          We're about 80% but most of the grunt work is done.
          Take a look at the way I've changed your recommendation.
          The problems encountered were that the previous choices in the list box would carry over to the next request, even if you left the form; and the transfer variables would retain the last choices ....

          Both are fixed and it seems to work great.

          the last 20% is being able to use the choice to go back to the item table and start transferring data from that table to the transaction line item table.

          Your use of 'evaluate_template' led me to 'code indirection' and maybe the answer lies there. I will update you if and when I either solve it or go crazy.

          Look at the comments in the 'pick_items' script for the changes that I made.

          thank you very much
          D

          Comment


            #6
            RE: Process multi-select listbox data

            The problems encountered were that the previous choices in the list box would carry over to the next request, even if you left the form; and the transfer variables would retain the last choices ....

            Because both are defined as global variables


            the last 20% is being able to use the choice to go back to the item table and start transferring data from that table to the transaction line item table.

            I'm not 100% following you. After you get the global vars assigned, which table do you want to stuff those values into?

            That is easy to do. Let me know, and I will amend the code accordingly.

            Peter
            Peter
            AlphaBase Solutions, LLC

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


            Comment


              #7
              RE: Process multi-select listbox data

              I knew why the global vars were not clearing.
              In the 'real app' they need to be cleared before each use.
              So, I made that correction.

              In regard to which table the data is destined...
              that would be the transaction line item table..

              The system is a bit complex. Everything is based on the customer appointment. As the appointment is made, all tables are 'updated' and the sales transaction is 'filled out'. There are pricing and workload factors that are contained in the customer item table that need to be 'stuffed' into the transaction table and the transaction line item table. In essence, the 'sales slip' is pre-made and ready for the future customer arrival.

              That means that once the customer is chosen, the customer item is picked and the date is chosen; the sales transaction is basically complete -- needing only the amount and type of payment to be filled in, as the customer picks up the item on the transaction completion date.

              I already have a working model of this system, but it only allows for one choice to be made. I need this 'revision' in order to accomodate multiple choices.

              Thanx for the direction and your help. Updates later....
              D

              Comment


                #8
                RE: Process multi-select listbox data

                Richard,

                I moved the button to your tax form and I changed the code a little. I'm not sure if this is what you want, but in this case as I understand it, you really don't even need global variables - local will do. Anyway, FWIW...

                -Peter
                Peter
                AlphaBase Solutions, LLC

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


                Comment

                Working...
                X