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

Add only table

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

    Add only table

    I spent yesterday trying to do a simple thing but I met so many obscure errors that I finally gave up and I'm hoping someone here can lead me to the right path.

    I'm creating a form that's just to add records. No browse or search, just fields on a form, I want to start with a blank record and when I save I want to go right into the next add.

    I can't make it come up with a blank record to start. I'm sure there's an event and an action script to take care of this but I can't find it.

    Also I need to fill in a variable that I can't do in the field rules. Every way I tried came up with an error. Either 'not in change or enter mode' or 'already in read mode'.

    I'm wasting so much time with this that I think I need to hire someone who can direct my efforts when I get stuck like this.

    #2
    Re: Add only table

    I'm creating a form that's just to add records. No browse or search, just fields on a form, I want to start with a blank record and when I save I want to go right into the next add.

    I can't make it come up with a blank record to start. I'm sure there's an event and an action script to take care of this but I can't find it.
    I'm sorry you had such trouble. This is a very easy thing to accomplish using Action Scripting. Use the action to open a form or browse layout and specify your data entry form. Then, when prompted to "show which records in target form or browse" select the option to "enter new record".

    There are refinements you can make once you get this going.

    For example, you can "hide" your form when it first loads. Then "show" it after you begin the new record.

    A button on the data entry form could be scripted (again with Action Scripting) to save (commit) the current record and automatically begin (enter) a new one.

    Some time spent reviewing the overview of action scripting in the helps system may pay dividends for you.

    Good luck with your project.

    Comment


      #3
      Re: Add only table

      I know how frustrating it can be. Coming from decades of Access and VB I still find, after more than a year, that I spend too much time trying to accomplish fairly simple tasks - it's just getting used to a new system. Great help here though.

      Zip and post your database here and you'll get versions back with your specific questions answered so that you can see how stuff is done.

      Comment


        #4
        Re: Add only table

        Thanks david I've attached a zip file.

        There are 3 forms in the database. A menu, a form to add records and a form to view records. The add form is supposed to be a heads down data entry screen that starts with a screen with blank data fields. when the save button is hit the data should be saved and the form initialized to blank. In addition there are two fields that need to be set before the data is saved, Status and trusteeid. I'm setting them in a can save event on the tsnumber field, but it does'nt work at all and throws vague errors.

        When I wrote this program in dos there was 1 line of code, namely, Status = 1 but it'll never be that easy ever again.

        I sure appreciate your taking a look at this. If I can make a successful rewrite of this I will get a major contract to web enable the companies main program.

        Comment


          #5
          Re: Add only table

          Just a few changes to the add form and the menu.

          From the Menu, the script opens the form, with the option to enter a new record.

          On the form, in your Can Depart event for tsnumber, it now setting the status and trusteeId fields on the form. I added these two fields, and you can hide them.

          I've not used the .data property before (just for getting data?). Just easier to add the two fields, hide them, and set their values.

          Are these the variables you mentioned?

          Comment


            #6
            Re: Add only table

            My first thought was to hide them but I searched high and low to a way to do it. When I came up empty I thought to set them on an event. How do you hide the little buggers because that would be my preferred method?

            Comment


              #7
              Re: Add only table

              I found the hide box, never mind

              Comment


                #8
                Re: Add only table

                Yeah... all that stuff is in the Properties of the field.

                What else do you want to do?

                I find response really slow with those linked tables. Do you find the same?

                Comment


                  #9
                  Re: Add only table

                  Jeez, I was halfway through with a response when my power supply blew out. So I'm going to build an all new high powered computer. The only thing I have left to do is to set the value of tsnumber. I'm reading it out of an a5 table that will sit on the users machine. I can't use field rules since it doesn't like me using a global variable. When I tried use the default setting in the runtime field rules, it doesn.t work.

                  When this is resolved I'll be done with this phase of the project.

                  Comment


                    #10
                    Re: Add only table

                    Are you getting the tsnumber from a dbf file on the users machine?

                    Is there a key into the file?

                    In general, how do you want to get it?

                    Comment


                      #11
                      Re: Add only table

                      I have a dbf table called sysdata that has a single record. There are 2 fields companyid and companyname. I have a function that reads it and assigns the fields to two global variables, thiscompanyid and thiscompanyname. I'm trying to take the value of thiscompanyid and put it into trusteeid in the orders table. I put a trace.writeln statement to make that thiscompanyid has a value and it does. I put it into the run time field rules as the default but it doesn't work. I'm out of ideas right now. Everything that's intuitive won't get the job done.

                      Comment


                        #12
                        Re: Add only table

                        Lee,
                        I can't use field rules since it doesn't like me using a global variable
                        Generally not true....even though a global variable cannot be "seen" by you in field rules, Alpha can see it---possibly add var-> in front of the variable as I seem to remember this being necessary--even if not it won't hurt.
                        Mike
                        __________________________________________
                        It is only when we forget all our learning that we begin to know.
                        It's not what you look at that matters, it's what you see.
                        Henry David Thoreau
                        __________________________________________



                        Comment


                          #13
                          Re: Add only table

                          Attached is another version.

                          With the script you created to open the form, I added a line that run your initUser function. Now your global variable is set. The form then opens and, after you enter your tsnumber, the code in the depart event fills in the trustee Id with the company number.

                          Lots of different ways to do this. It can be frustrating finding the Alpha way to do stuff.

                          Comment


                            #14
                            Re: Add only table

                            Thanks Davis, that solved the problem. How in the world di you find out about <form>:<data>.value. I've been researching this for days and never even new that existed. Very helpful to know. Now I just have to speed it up.

                            Also do you know where there is any info on how to deploy an app when it's done because I need to submit this to the comapny for review.

                            Comment


                              #15
                              Re: Add only table

                              Found lots of references while looking for other stuff in the help file when I first started. Look here in the help file... "Referring to Form and Browse Objects"

                              You'll need the runtime to deploy your app... unless they have a development system. If they have Alpha5 then you can, from the Control Panel, go to Tools, and then Zip Database, or Send Database, or Backup Database. I usually just zip it when transferring from one location to another.

                              Have a look on the Alpha site for runtime information, and in this forum too. There's lots of stuff you can set... Autoexec scripts, splash form, database behaviours and settings.

                              Comment

                              Working...
                              X