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

Form for new record

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

    Form for new record

    I want to create an form that allows a user to enter new data into the appropriate fields and then push a "save" button to create the new record. I created the form but when I enter it, the first record displays. As a new user I was hoping I could just use a genie.

    Thanks

    #2
    RE: Form for new record

    Your form is based on a table or set. The underlying table or set gets opened automatically when the form opens. If your form contains objects which display fields from each record, the current field values will be displayed.

    You might try using the genie to build a button that will enter a new record. When pushed the button's script will cause the fields to clear automatically, so that the new values can be entered and saved...


    -- tom

    Comment


      #3
      RE: Form for new record

      Thanks alot for your help!

      Comment


        #4
        RE: Form for new record

        Allan:

        You can also use Action Scripting. Add "NewRecord" to the "OnInit" script for the form. When the form opens it will automatically switch to entry mode.

        With this method you save a mouse click since a separate button isn't required to go into "entry" mode.

        John

        Comment


          #5
          RE: Form for new record

          You can also add a calculated field to the database. I have one that sets the field named "Printed" with the value of "Y" when the record is saved. The filter properties of the form itself has the expression PRINTED"Y", so the data never shows when the form is opened. Since there is no data to show, it always goes into enter mode. My form however, kicks the user back to the previous screen when the "print/save" button is pressed. So they always have to come back into a clean form.

          Comment


            #6
            RE: Form for new record

            This is exactly what I wanted but it didn't work. I went into the form - choose properties - action. I set the OnInit action to (radio button "form") New Record. Saved the code - saved the form - then double click the form and the first (and only record) is in the form. Any other things I should look for?

            Comment


              #7
              RE: Form for new record

              Hello Alan:

              I have written step by step instructions below to handle what I think you are attempting to do. I wrote these in a hurry so I hope I didn�t leave any steps out and that they make sense.


              1. Open the form for design.

              2. On the menu bar, click FORM, then ACTIONS....

              3. The Code Editor will open. The �Container� field should contain the name of your form. Using the drop down list button on the �Script� field, highlight and click �OnInit�.

              4. Go to the larger window on the left side of the Code Editor window where �Action Script� is displayed and highlight (click) �Action Script�.

              5. On the tool bar click the �Insert Action� icon OR on the menu bar, click �CODE�, then �INSERT COMMAND�.

              6. The actions window will now open. Scroll through the actions and highlight (click) on the �New Record� action. Then click the �NEXT� button at the bottom of the actions window.

              7. The Object screen will open showing �PARENT�. At this point you can make a decision but THIS should work for you. Change �PARENT� to �THIS� and press the �NEXT� button at the bottom of the screen.

              8. Click the �FINISHED� button, close the code editor and exit the design mode.

              This should do it for you. When the form is opened, it will switch over to �entry� mode with blank fields. How you handle saving the record is up to you.

              I hope this helps.

              John

              Comment


                #8
                RE: Form for new record

                Thanks John - The reason it didn't work before was I put "THIS:" instead of "THIS". Thanks again for your help.

                Comment


                  #9
                  RE: Form for new record

                  There is another method of doing this without learning any XBasic.

                  I do this all the time to save time writting code (not my favorite thing in the world)

                  First, go into design mode for your form and make a button to save the record. Click Object-New-Button-Click OK, Click Next, Select "Record Operations", Select "Save Record" from the right hand column, click next, click Finish

                  Make another button for entering a new reord by the same method, just substitute "Enter new record" for the "Save Record" portion above.

                  Now, right-click the "Enter record" button, Click "Actions". You'll see a XBasic command and its icon, right-click the icon and then click "Copy", close the window.

                  Go to the save record button and right-click, selct "actions" and then right-click the icon for the XBasic command. Select paste.

                  Save the definition.

                  Now, when you click the save record button, it will save the current record and let you enter the new record automatically.

                  You can delete the original "Enter new record" button.

                  If you want, select properties of the button (Right-Click it)and make sure "Tab Stop" is checked. Then, when you finish entering your last fields' data and press enter, it will save your data and then go to the enter data mode automatically without needing to press the button at all.

                  I'm glad you asked the question because it made me think of places where I need the exact save function.

                  Comment


                    #10
                    RE: Form for new record

                    To John De Jong.

                    I am an old A4 user and I have just about given up on A5. I am using A5 V4.5 and am trying to do an action scripting as you suggested to add a new record. You said, "you can also luse Action Scripting. Add 'NewRecord' to the 'Onlnit' script for the form. When the form opens it will automatically switch to enter mode.

                    Maybe I am just to stupid. But I cannot find anywhere where there is anything about "Onlnit". The old A4 manual really was great. The A5 manual doesnot list "onlnit" anywhere, and the help part of A5 doesn't either. Can someone please help me?

                    Comment


                      #11
                      RE: Form for new record

                      Hi Daniel,

                      Please be patient. I know it's hard when things are so frustrating. I, along with many others, have been lost in the woods like you are now. Most everyone, and certainly Selywn and Richard, are very much aware how lacking the V4 manual is and no doubt will make a very concerted effort to improve the v5 manual along the format of the A4 manual. At least, that has been the request from many.

                      I will check out how I did this and post the procedure shortly. In the mean time, "hang in there"! We won't leave anyone lost. We're here to get you out of the woods.

                      kenn
                      TYVM :) kenn

                      Knowing what you can achieve will not become reality until you imagine and explore.

                      Comment


                        #12
                        RE: Form for new record

                        Daniel,

                        Here's what I did. I used Xbasic as for some reason, I couldn't get it to work with action scripting.

                        Try this: Right click on the form and choose Actions, then choose OnActivate. Click the Icon for sitching to xbasic (2nd from the right) Add the following.


                        :EnterNewCase.Activate()
                        :EnterNewCase.Show()
                        :EnterNewCase.New_Record()

                        Now, when you create a button to open the form, it will open, ready for data entry.

                        Hope this helps.

                        kenn
                        TYVM :) kenn

                        Knowing what you can achieve will not become reality until you imagine and explore.

                        Comment


                          #13
                          RE: Form for new record

                          Hello Daniel:

                          Don�t give up.... and No - you are not stupid. I also started with Alpha 4 (Ver 1 I believe - it was a long time ago) and the Alpha 4 documentation was much better than Alpha 5's. Then again Alpha 4 was more strait forward than Alpha 5 and I would almost always scoot around in 4 to do what I wanted without the manuals. Alpha 5 is a totally different animal....Windows GUI, etc... but also much much more powerful than Alpha 4.
                          Like Ken Nordin wrote �Please be patient.� I know I was very frustrated at times with Alpha 5 and the lacking documentation... (still have those moments at times), but the �pain� learning A5 is worth the �gain� in the power, so don�t give up. This message board has also been a great help, both in asking a question and in many cases, searching for answers to a question that has already been covered in the past.

                          As for finding �oninit�.... I have found that the best way to find information and answer questions is to scan the online documentation for keywords, etc. I prefer the Acrobat Reader (PDF) format. You will find several references to �oninit� if you scan for it in the Xbasic Reference Manual - Version 4.

                          And as for the solution to your dilemma...

                          If all the posts by others haven�t helped you yet, email me and we will get this resolved.

                          John
                          [email protected]

                          Comment


                            #14
                            RE: Form for new record

                            Thanks for both your answers (John & Ken). I am on my way to church now (I am a deacon), but will try your suggestions later. Again thanks. I'll keep you informed.

                            Comment

                            Working...
                            X