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

Record moves on save

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

    Record moves on save

    I have a form based on the set:

    vehicle -" jobs -" parts

    and when adding a new or modifying an existing job for a vehicle open another form based on another set:

    jobs -" fitters
    -" parts

    When I go to save the record in the jobs form, usually when adding a new job c.f. modifying an existing job, the job record displayed will often move to a previous job done for the same vehicle.

    I have turned off record navigation in the job form and the save button does nothing but save the record.

    Any ideas?

    #2
    RE: Record moves on save

    Does the form have built-in ordering?

    Form in design mode, Form menu, Properties, Filter/Order tab...
    There can be only one.

    Comment


      #3
      RE: Record moves on save

      The main form based on the vehicles-"jobs and -"parts set is ordered by vehicle registration number.

      The jobs form based on the jobs-"fitters and -"parts does not have any order as only one job is open at a time.

      Comment


        #4
        RE: Record moves on save

        Can you post an example for us to examine?

        -- tom

        Comment


          #5
          RE: Record moves on save

          Here is a stripped down version.

          To logon select administrator and password xmts

          Go to the form Jobent and select a vehicle (some already in) then go to the Jobs tab and click on the add new job button above the upper browse. Fill in the job details (a couple of fields are required so use dots etc).

          If you do not add any parts to the job, irrespective of how many fitters you have added to work on it, it saves ok without moving to another job.

          If however you enter 1 or more parts, it usually moves to another job. Also if you go to the invoice tab on the job ticket and change or type into any fields there, it will move.

          I am lost as to why it is doing this.

          Comment


            #6
            RE: Record moves on save

            John,

            I think the trouble lies in your Save button on the called form. The form is based on a set that includes two child tables. Data entry into the children is done using separate embedded browses. Your single SAVE button uses a command that saves the primary table record only.

            In Alpha Five data entry occurs one table at a time. There is no such thing as a "set record" which can be saved with a single command. Instead, data entry begins and must be saved, one table at a time. First the primary table, then a child, then the next child.

            You can see this yourself if you begin a new job, enter a new Fitter record, but don't press your Save button. Instead, use the F9 key to save the Fitter (child) record. Then move to the parts browse and enter a new record, using F9 to save it there.

            the form does not crash, Alpha does not lock up, and the record pointer does not arbitrarily jump to a different job.

            I'm uncertain what to advise on the best way to fix this. Certainly one approach would be to use 3 different save buttons, one for each table, hiding and showing the "current" one depending upon which table is being changed. But it seems clear to me that your one button approach using

            formname.commit() to save the records in linked 1:N child tables will not suffice.

            Hope this helps.

            -- tom

            Comment


              #7
              RE: Record moves on save

              Tom and John,

              Although rare, I have run into situations like this, too.

              Here is a brute force method that will work:

              Save Button:
              dim rnum as n
              rnum=table.current(1).recno() 'the parent record
              'invoice is the form name
              invoice.commit()
              'only fire if it jumped
              if table.current(1).recno() "" var-"rnum
              Invoice.Recno_goto(rnum)
              end if
              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


                #8
                RE: Record moves on save

                Thanks for the help.

                I have put record save buttons above each browse and asked the users to click on them when they exit each and before entering the next field on the form and this works.

                Tried using on row change event to save the record in the browse but that locked up the form.

                Comment


                  #9
                  RE: Record moves on save

                  John, where you are using an embedded browse, the record necessarily saves/commits when you change rows or depart the browse - thus the canrowchange and candepart browse events are useful for using code that fires before the browse record saves.

                  you don't need to commit the browse, in other words.
                  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

                  Working...
                  X