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

canceling a enter new record on an embedded browse

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

    canceling a enter new record on an embedded browse

    Greetings all.

    I am confussed and frustrated trying to figure out how to cancel the entering of a new record on an embedded browse.

    The form the browse is on is modal. When I enter a new record, as long as I am in the first 2 fields (dates) I can cancel or press esc and the record I am entering goes away. If I go to the 3rd field, which is a look up, when I cancel it enters the record with blank fields. But it behaves differently depending on how you cancel.

    Case 1: I have a button called Cancel, on push, Cancel Changes on current form at browse level. Same behavior as above.

    Case 2: Click cancel changes on toolbar first time, current record goes away and moves me to record above in change mode. Click cancel changes second time, exits change mode.

    Case 3:Cancel changes is the same as pressing (esc). Enter past first 2 date fields which default to today, 3rd field press esc before selecting from lookup; field is blank, down arrow still present to choose lookup for field, press esc 2nd time current record goes away, move to record above in the same field with down arrow still present, record still in change. Press esc 3rd time record is now out of change.

    Case 4: Cancel changes is the same as pressing (esc). Enter past first 2 date fields which default to today, 3rd field select something from lookup table press esc 1st time and dialog box pops up "are you sure you want to lose changes" click yes, current record goes away, moves to the record above in change mode, press esc again and exit change.

    Case 5: Change action script for cancel button. action 1 give focus to first date field in browse1, action 2 send {esc} same behavior as case 1.

    I hope I have made it clear what I am trying to do. I can post my app if needed. How do you cancel entering a record in an embedded browse and why does it behave so differently between using the toolbar, the keyboard, and an action script?


    Alan



    #2
    RE: canceling a enter new record on an embedded br

    Alan,

    Data entry through an embedded browse is difficult to control. The events that are available to us when working with a form and its field objects, are not exposed when working with columns in browses. The browse object is slated for major work, but ...

    If the behavior you're seeing is unacceptable I suggest you use a separate form to enter / edit records in your child table. This could be called from the current form easily. In fact, this is my preferred modus operandi. I make my embedded browses read only, use them for navigation, and then use a button push to begin a new child record in a called form. Edit to existing records can use the same called form, and can be called from the OnRowDbleClick event.

    -- tom

    Comment


      #3
      RE: canceling a enter new record on an embedded br

      Tom's method is preferable, but I sometimes run into situations where i can't do that.

      a way around it is to go to fields rule, and decide what constitues a blank record (preferably 2 character fields)

      in record events, in field rules, in cansaverecord put
      if .not. a_deleting_record
      t=table.current()
      if t.name="" .and. t.address=""
      cancel()
      end
      end if
      end if

      this will prevent the "blank" record from being saved.
      Cole Custom Programming - Terrell, Texas
      972 524 8714
      [email protected]

      ____________________
      "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

      Comment


        #4
        RE: canceling a enter new record on an embedded br

        Thanks for the input Gentlemen.

        I decided to use a Xdialog to accomplish what I wanted. have not finished it yet, but I have made major headway.

        Thanks Again,

        Alan

        Comment


          #5
          Originally posted by martinwcole
          Tom's method is preferable, but I sometimes run into situations where i can't do that.
          a way around it is to go to fields rule, and decide what constitues a blank record (preferably 2 character fields)

          in record events, in field rules, in cansaverecord put
          if .not. a_deleting_record
          t=table.current()
          if t.name="" .and. t.address=""
          cancel()
          end
          end if
          end if

          this will prevent the "blank" record from being saved.
          Excuse me - does this method have to be applied to WHAT field?
          or does it not matter? Is it wothin the forms 'cansavearecord'

          Getting a quick dose of this thing you all call events...

          Thanx
          George

          Comment


            #6
            The field rules record events operate at the record level so it doesn't matter which field is active in the field rule editor at the time of setting it up.
            Tim Kiebert
            Eagle Creek Citrus
            A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

            Comment


              #7
              Further.....

              Originally posted by Tim Kiebert
              The field rules record events operate at the record level so it doesn't matter which field is active in the field rule editor at the time of setting it up.
              Since it isn't always clear to new users the proper application of events, the CanSaveRecord, not cansavearecord, is edited/coded by hilighting a table in the control panel, right clicking, choosing Edit Field Rules, choosing the Event tab, choosing Record Events radio button, selecting CanSaveRecord in the Event: box, and entering the code desired.
              There can be only one.

              Comment


                #8
                Thank you -

                This code has been entered into my inv_tab table:

                if .not. a_deleting_record
                t=table.current()
                if t.invoice_number="" .or. t.ticketno=""
                cancel()
                end
                end if
                end if


                invoice_number and ticketno being fields within.

                Strange though.. one of my codes 20 / form I have, so the user can enter only records with a code of 20 - works great.

                Now switch to a different form code 21 / form. You can enter the code 2160 (say) and then it will not go any further when you hit enter. I've compared the forms and the embedded browse within that holds the records and they appear to be the same... I know this is a bit sketchy - but lemme ask is there something else I should be checking?

                Thanx
                Grge

                Comment


                  #9
                  Documentation

                  Check the webhelp index for

                  Form
                  Restrictions

                  and see the description of "Continuous Enters"
                  There can be only one.

                  Comment


                    #10
                    Overwhelmed -
                    as he tilts his head sideways and mutters - HUH?

                    What I did do is create a routine that runs on OnExit which queries the table for blank records and deletes them - read about having it perform silently in another post.. works good so far..

                    Are there any draw backs to this simple solution?

                    George

                    Comment


                      #11
                      What I did do is create a routine that runs on OnExit which queries the table for blank records and deletes them - read about having it perform silently in another post.. works good so far..

                      Are there any draw backs to this simple solution?
                      I would be concerned about deleting the last record. In my experience, deleting the last record in a table can sometimes create problems when scrolling through a browse of the data.

                      I think you would be better off with a routine like Martin described. This avoids saving the blank record in the first place. If the blank record is never created, there's no need to delete it.

                      I've compared the forms and the embedded browse within that holds the records and they appear to be the same
                      I'd have to believe there is something in your logic somewhere that is causing this problem. It could be in the form or in the field rules. Test it on the default form - if it stops happening, it's something in the form. Otherwise, check your field rules.

                      Also, make sure you compact your database periodically. If you've done a lot of development without compacting the database, all kinds of strange things can sometimes happen.
                      Last edited by CALocklin; 02-19-2006, 10:16 AM.

                      Comment


                        #12
                        Originally posted by Stan Mathews
                        Check the webhelp index for
                        Form
                        Restrictions
                        and see the description of "Continuous Enters"
                        Stan were you talking about the "setting form restrictions?"
                        I WANT the user to enter items in the browse table.. BUT I do not want them to change their mind click,esc out and a blank record gets saved anyway -

                        I did look at the field rules Tim - and forms but I honestly cannot see any difference between any of them. Just the code field that appears for the customer. Default form? sure it works BUT it also works on one of my Forms I created... The other forms work BUT as soon as you enter into the browse and put a CODE in the field you can't hit enter,tab,arrow to get out of the field.

                        I'm gonna have their boss just give 'em a pencil and paper.. maybe a calculator. ;) One of the folks opted to go back to the old DOS version of Alpha - she was one of the old timers - "took longer, but at least it worked" she said - She doesn't remeber why they switched - support and strange things happening on their PC's etc...

                        Thanx
                        George

                        Comment

                        Working...
                        X