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

Next item to be in focus on "candepart" event.

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

    Next item to be in focus on "candepart" event.

    On a candepart event, is there any way of knowing where focus was going to go, if the depart is allowed?
    Explanation. I have a form where the manufacturer and model number are selected via dropdowns. But if the user knows he is inputting a manufacturer that does not exist yet in the system, he pushes a button on the form to call another form, to enter all the info for a new manufacturer. The problem is that the user might by accident have blanked the manufacturer field, and this would create an illegal entry, UNLESS the user is moving focus to the button, in which case blank manufacturer and model number fields are OK. So I can't use a candepart event (or a field rule) to check for a blank field.

    #2
    Re: Next item to be in focus on "candepart" event.

    Nick, if I understand your question, I think the answer is no. Maybe you can set a variable TRUE if the user is entering a NEW manufacturer? If so, your canDepart script could check that value before throwing up the omitted / required field message. However, I think a better solution would be to prevent the user from entering a record in the current form if a new manufacturer is required. I'd force them to use the other form before coming back to the current one, or I'd find another way to check for blank manufacturer fields (instead of using the canDepart event).

    Comment


      #3
      Re: Next item to be in focus on "candepart" event.

      I agree with Tom but you do pose an interesting question. The tab order has to be stored somewhere. I can't find anything via the object explorer about tabs other than tabstop yes or no.
      There can be only one.

      Comment


        #4
        Re: Next item to be in focus on "candepart" event.

        Thanks for the responses.
        Tom, it's not quite that easy. The user may not know until he gets to the form that the manufacturer is in fact "new". I can (and do) check for a blank manufacturer field before saving the record for the new item, but I have had to move all sorts of other code to the "on save" event to make sure I did not do all kinds of processing only to find the manufacturer field had been blanked out by the user. So my code all works OK, just a bit complex.
        However, my main interest was the one referred to by Stan. Alpha must know what field was going to be in focus next, because if the candepart allows depart to occur, that's where the cursor goes. Not even a tab, the button might not be in the tab order but have been selected by the cursor. As I remember, there's an xbasic command to tell you what field was in focus last, but nothing to tell you what will be in focus next, even though it's a defined object.

        Comment


          #5
          Re: Next item to be in focus on "candepart" event.

          Alpha must know what field was going to be in focus next, because if the candepart allows depart to occur, that's where the cursor goes.
          I would say that Alpha lets you handle the next object to receive focus via the canarrive event. Cumbersome but you could code all the objects' canarrive events to send focus back to the desired object.
          There can be only one.

          Comment


            #6
            Re: Next item to be in focus on "candepart" event.

            Yes, I thought of doing that. It would be nice not to have to do that though (I have around a dozen fields or buttons) , since Alpha clearly must know where it is going, because it goes there if the candepart event does not issue a "cancel".

            Comment


              #7
              Re: Next item to be in focus on "candepart" event.

              Maybe I'm not seeing the problem clearly but maybe I could plant a seed for another, simple approach.
              I developed a realtime auction app in Dec, wherein it is quite likely that an item delivered for auction is from a new seller.
              In the capture of the item, the seller field has a dropdown combo, and if the seller is not in the list, user enters a new code for the seller immediately (seen to the right in the picture) the seller details creates a new seller record with that code pre-entered.
              (I use alphanumeric, user generated linking codes)
              If it is desired to keep that new record, then user captures additional details of the seller right there and it will save when SAVE is pressed for the stock.

              If it can be of any help, this is what it looks like.
              Picture didnt attach I will try again
              Last edited by Ray in Capetown; 03-16-2012, 02:28 PM. Reason: No screenshot

              Comment


                #8
                Re: Next item to be in focus on "candepart" event.

                Screenshot?
                Attached Files

                Comment


                  #9
                  Re: Next item to be in focus on "candepart" event.

                  My form looks very similar, except the "new manufacturer" is a separate form called by a button.
                  So what prevents the user from blanking the dropdown field?
                  Mine's a bit more complex because the manufacturer is used to filter a second drop-down for existing model numbers, and then the two fields filter a third dropdown for descriptions (the same model number could be in inventory multiple times with different options and descriptions).
                  I can detect any errors at the onsave event, (or at the canarrive event for the other fields, as stan suggested), but I was trying to do it earlier to avoid the user having to make data entry which then got backed out. Just more convenient.

                  Comment


                    #10
                    Re: Next item to be in focus on "candepart" event.

                    Hi Stan,

                    Originally posted by Stan Mathews View Post
                    I agree with Tom but you do pose an interesting question. The tab order has to be stored somewhere. I can't find anything via the object explorer about tabs other than tabstop yes or no.
                    The Tab order is a layout property.

                    e.g
                    dim formpointer as P
                    formpointer=formname.this
                    dim tab_order_list as c
                    tab_order_list=formpointer.tab_order()

                    ' change order, add, delete objects in list, then set back in form
                    ' I have never written the tab order back, but I suspect it would work immediately
                    ' in view mode as well as change or enter
                    formpointer.tab_order(tab_order_list)

                    ' There is a second flags parameter, but the only useful purpose may be to determine the field types or for a dialog box
                    'Try this in the interactive window
                    ?formpointer.tab_order("","SI")
                    Regards,

                    Ira J. Perlow
                    Computer Systems Design


                    CSDA A5 Products
                    New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                    CSDA Barcode Functions

                    CSDA Code Utility
                    CSDA Screen Capture


                    Comment


                      #11
                      Re: Next item to be in focus on "candepart" event.

                      Thanks Ira.
                      There can be only one.

                      Comment


                        #12
                        Re: Next item to be in focus on "candepart" event.

                        ira - interesting. Would not solve my problem though, because the button is not in the tab order...

                        Comment


                          #13
                          Re: Next item to be in focus on "candepart" event.

                          Oh yes it is Nick.
                          taborder.png
                          See our Hybrid Option here;
                          https://hybridapps.example-software.com/


                          Apologies to anyone I haven't managed to upset yet.
                          You are held in a queue and I will get to you soon.

                          Comment


                            #14
                            Re: Next item to be in focus on "candepart" event.

                            You misunderstand me. The button is not in the tab list because I removed it. The tab order contains all the fields the user tabs through to complete the data entry. Buttons are selected with the cursor.

                            Comment


                              #15
                              Re: Next item to be in focus on "candepart" event.

                              Show me a screen shot Nick.
                              See our Hybrid Option here;
                              https://hybridapps.example-software.com/


                              Apologies to anyone I haven't managed to upset yet.
                              You are held in a queue and I will get to you soon.

                              Comment

                              Working...
                              X