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

Append current record

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

    #16
    Re: Append current record

    Originally posted by [email protected] View Post
    .....There is no action script for "open table" that I can find.

    Bill
    No, but there is an action to enter a record by xbasic.

    Records - Xbasic Enter Record
    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


      #17
      Re: Append current record

      You're absolutely correct Tim. I'm still having a problem though, understanding what "the current record" is. The help files lead me to believe it's the one I'm working on, which is logical to me.

      from the help files;
      records based on values from the active session's current record.

      If I begin data entry in a form, how can that not be the current record? Or is the current record the one previously saved prior to the one I am now entering?

      Bill Belanger

      Comment


        #18
        Re: Append current record

        Bill, it is as you suspect. If you are working in a form the current record is the one that you are viewing or editing, including a new record. I just tested the 'Xbasic Enter Record' action script from a button on a form. Whether I was viewing an existing record, editing an existing record but not yet saved, or entering a new record and not yet saved the values used were that of the record visible in the form. Are you still having problems with this action as far as getting the correct record's values?
        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


          #19
          Re: Append current record

          Tim,
          Didn't see your reply until just now. After reviewing all the helpful tips, I decided on using the xbasic add record routine. It's almost exactly like the "set field" script step I was used to in Filemaker and works as expected. The "xbasic" scared me away at first, but it's just a regular action script. Thanks for that tip.


          Bill Belanger

          Comment


            #20
            Re: Append current record

            Your welcome, glad to hear you are on your way again. Although in my testing the action script seemed to handle grabbing data from an unsaved record I would recommend that you commit the record before 'appending' the data to the second table.

            Once you have it working the way you want take a minute and look under the hood at the xbasic. What you will find is pretty much the kind of script that Tom suggested earlier in this thread.
            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


              #21
              Re: Append current record

              Yes, I believe you and Tom were saying the same thing. I just like the action script because it walked me through the steps. I intend to begin looking under the hood. But I believe there's a reason they added the "X" before the "basic" :-)

              Bill

              Comment


                #22
                Re: Append current record

                Sorry, I has one question: even though I did not save the record but why it still appears in my table and even it is just a blank record? This creates many blank records in my table by just switching the form between design mode and form view but nothing else. The only thing that changed is the auto-incremented ID.

                I put cancel() in the form event OnSave and I thought this will make the user save the record only when he push a Save button. I don't know what is going wrong. What I want to do is add a new user and save the record only after I push a Save button.

                Please advice.

                Thank you.

                Comment


                  #23
                  Re: Append current record

                  Bill
                  I use an operation to append records. I'm not as good as you at programming but what I do is tell the action script to only append unique records. That does it for me.
                  Jim Belanger

                  Comment


                    #24
                    Re: Append current record

                    Leow,

                    There are situations in which Alpha Five will save a record for you automatically. Often this occurs in set based forms when the user shifts focus from fields in one table to fields in a different table. Recommend you study how the "default form" for your table or set behaves.

                    The OnSave event fires AFTER the record has been saved. If you want to block an empty record you have to use an event that fires BEFORE the save. Try the CanSave event. I believe the help file discussion on the CanSave form method illustrates how you can use this event to run a script that will validate the record before commiting it to disk.

                    Comment


                      #25
                      Re: Append current record

                      Tom,

                      Thanks for your reply.

                      I'm sorry as I've given the wrong event name. I put cancel() under CanSave event instead of OnSave. That's the reason I wonder why it still save the record automatically.

                      Let me clarify my program. I have a simple form to add a new record to a table. In order to enable the form to be ready for a new record to be entered every time it is initiated, I put parentform.new_record() in OnInit event. And every time after the Save button is pushed, I call a parentform.new_record() again for it to be ready for the next new record and reset cancel in CanSave event for the form.

                      However just like what I said even I do nothing but just switch between design mode and form view, I still get blank records saved into the table. Any thought?

                      I will examine the default form and see if I can solve this problem.

                      Thank you very much.

                      Comment


                        #26
                        Re: Append current record

                        I suspect the OnInit event is firing each time you switch to view mode from design mode.

                        A better approach that many use is to open the form with a button push event script. The button's onPush script LOADS the form but keeps it hidden. Then a new record is begun in the hidden form. Then the form is displayed. This can be done with Action Scripting.

                        If you don't use the OnInit event script then the form can be used for multiple purposes. Not just for entering, but also for editing or viewing.

                        If you wish we could look more closely at your specific form. Zip your database files and post them here as an attachment to your next reply. Use the "Go Advanced" button to get to the Manage Attachments dialog.

                        Comment


                          #27
                          Re: Append current record

                          Tom,

                          Thank you for your respond and help. Here I attach my sample test database. Please have a look at "New Relationship" form. I don't know if I design in a correct way because I'm a newbie to A5. But basically what I want in my program is just to add new, view, delete and modify.

                          Thanks again for your help!! :)

                          Comment


                            #28
                            Re: Append current record

                            Leow, I stand by my original advice. The OnInit event is firing each time you shift from design to view mode. This is triggering a new record to begin. I am not sure why the CanSave event for the form is not catching and blockiing the save. I recommend you abandon the use of the OnInit event to begin your new records. I recommend you remove the cancel() from the canSave event for the form.

                            You will benefit from experimenting with the default form for your table or set. Right click the table or set name in the control panel to get to the default form.

                            -- tom
                            Last edited by Tom Cone Jr; 06-26-2008, 10:44 PM.

                            Comment


                              #29
                              Re: Append current record

                              Tom,

                              Thanks for your quick reply.

                              If I remove cancel() from CanSave event means that A5 will automatically save records for me? This is not what I intended to do.

                              Anyway, I will take your advice to experiment with the default form and see if I can get this resolved.

                              Thank you. :)

                              Comment


                                #30
                                Re: Append current record

                                Here's a more traditional approach for you to experiment with and possibly learn from. Unzip the attachment to a new (empty) folder.

                                I've modified:

                                Main_menu form
                                New_Relationship form
                                New_Relationship_form script

                                Let me know if you have questions.

                                Incidentally, in my own work here I find using short names very advantageous. My personal goal is to limit names to 10 chars. This is especially important for table names, field names, and index tag names.

                                Comment

                                Working...
                                X