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

Editing a Field on a Form - Reverting to the previous value

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

    Editing a Field on a Form - Reverting to the previous value

    Okay, I'm baffled!!

    I have a form for staff. One of the staff people is Danny Demo for demo'ing purposes. I went to change his name to Peter Demo, but it wouldn't let me change the first name field. After further investigation, I couldn't change ANY of the fields! I'm not new to Alpha 5 at all.

    I went into form properties and starting testing them. I even created a new form and put my fields on it. When I change the field data, then I hit F9 or Save on the toolbar it reverts back to what the field use to be and will not save the new data ... ie, field was Johnny, changed it to Peter, hit Save and the field reverted back to Johnny. This is consistent with ALL fields on the form.

    I will say that after creating 5 new forms, re-adding my fields and buttons to it one by one then testing the forms ability to retain new data, updating my form properties and the browse properties for the browse I added to the form the 5th one finally worked.

    Yes, I've got the Staff form to work but this isn't the first time I've had this problem, plus I have no idea why this 5th one worked and the previous 4 forms I recreated didn't so I thought I'd present this to the forum to see if anyone knows of a known bug causing this problem.

    The application was partially from v7 and v8. I have read somewhere where I have to recreate forms that were created in v7 or less. But for me to recreate a form field by field, button by button 5 times before it actually worked properly there must be a problem, so I'm assuming.

    This is the 2nd form I've had to recreate in my application. The first one worked fine after the first newly created form was built.
    Brad
    Alpha5 User since Alpha4V3 ... Many years ago
    Primarily using A5V10.5
    Strictly an Action Script programmer (I don't grasp XBasic but wish I did!)
    I have commercial software for insurance agencies, churches & general businesses

    #2
    Re: Editing a Field on a Form - Reverting to the previous value

    Amazing ... it's no longer working (the time it took me to write the previous post). It's back to fields reverting back to the original data and not retaining the new data. It appears to be a problem with the browse on the form (assumption).

    As you can see by the attached image, this is a pretty basic form, nothing fancy. I did add a conditional object to form, last thing I did to it.
    Last edited by Brad Chesnut; 06-15-2009, 09:59 PM.
    Brad
    Alpha5 User since Alpha4V3 ... Many years ago
    Primarily using A5V10.5
    Strictly an Action Script programmer (I don't grasp XBasic but wish I did!)
    I have commercial software for insurance agencies, churches & general businesses

    Comment


      #3
      Re: Editing a Field on a Form - Reverting to the previous value

      Where is the data stored? If it is located on a server, does the user have privledges to modify data?

      Also, if the user login does not have a password, even if you give the user full access, on Windows 2K3 Server and above, you must change a default setting in Administrative Tools, Local Security Policy, Local Policies, Security Options, Accounts: Limit local account use of blank passwords to console login only" needs to be disabled.
      ---------------------------------------------------
      Barry Kucher
      http://www.411tech.org

      Comment


        #4
        Re: Editing a Field on a Form - Reverting to the previous value

        This is about as simple as it gets ... the full A5 and the application BOTH are running on my laptop.

        I am using Server 2003, but not accessing data via the network. However, if I was wouldn't this affect other forms, not just the staff form?
        Brad
        Alpha5 User since Alpha4V3 ... Many years ago
        Primarily using A5V10.5
        Strictly an Action Script programmer (I don't grasp XBasic but wish I did!)
        I have commercial software for insurance agencies, churches & general businesses

        Comment


          #5
          Re: Editing a Field on a Form - Reverting to the previous value

          Open the default form for the table or set supporting your form. Can you edit field values there? If not, look to the set design or the field rules of each table.

          Comment


            #6
            Re: Editing a Field on a Form - Reverting to the previous value

            Tom,
            I tested the Default Form first thing ... works fine there which is why I recreated the form so many times and am trying to figure out why the recreated forms aren't working ... Browse? Form Properties? Browse Properties? Conditional Objects? What???

            No set here. Just a stand alone single table. I updated the indexes, deleted non-essential indexes too. Minimal Field Rules here too. If only 1 field reverted back that would be one thing, but since ALL fields on the form revert back, huhmmm.

            I pulled the application into V8 (have been working in V9). I can change the field IF I hit save while I'm still in that field. If I tab out or hit enter to leave that field, then when I hit save (while in V8) it would revert back to the previous value. I tested this same thing in V9 ... no go, reverted back to old value even when I stayed in field and hit save.

            Certainly a baffling experience here. My fear is will I have this same problem in other fields on other forms? This is a new commercial application I'm about ready to role out and I just happen to run across this problem. Was getting ready to do a trial version. I can certainly go back to V8, I suppose, which seems to be quite a bit more solid and stable over V9 from my experience.
            Brad
            Alpha5 User since Alpha4V3 ... Many years ago
            Primarily using A5V10.5
            Strictly an Action Script programmer (I don't grasp XBasic but wish I did!)
            I have commercial software for insurance agencies, churches & general businesses

            Comment


              #7
              Re: Editing a Field on a Form - Reverting to the previous value

              It might be time to post a sample of the database.

              Comment


                #8
                Re: Editing a Field on a Form - Reverting to the previous value

                I don't disagree. I pulled the staff.dbf out of my application and put it into a folder of its own. I created a new application and added Staff.dbf to it. I tested the form, and to my surprise it worked fine.

                Is it, can it be the application? The Toolbar?

                That was a good test, but what is it telling me?
                Brad
                Alpha5 User since Alpha4V3 ... Many years ago
                Primarily using A5V10.5
                Strictly an Action Script programmer (I don't grasp XBasic but wish I did!)
                I have commercial software for insurance agencies, churches & general businesses

                Comment


                  #9
                  Re: Editing a Field on a Form - Reverting to the previous value

                  Here's the link to demo the problem ... http://www.iamcllc.com/personal/Staf...StaffProb.html

                  See the problem first hand and some of the things I've done to resolve the problem. It doesn't matter what record I'm on, or what field I'm trying to change, it's the same problem.
                  Brad
                  Alpha5 User since Alpha4V3 ... Many years ago
                  Primarily using A5V10.5
                  Strictly an Action Script programmer (I don't grasp XBasic but wish I did!)
                  I have commercial software for insurance agencies, churches & general businesses

                  Comment


                    #10
                    Re: Editing a Field on a Form - Reverting to the previous value

                    Okay, I believe I've solved the mystery.

                    I created a brand new application, added the tables to it, went to the old application and copied the Code's (Code Tab on control panel) to the new application. Everything is working great now! It appears to have been something to do with the application itself.

                    Now, for reference purposes, that application was likely originally created in V6 or 7 that I continued to carry forward in my laziness. It is very easy to create a new application and copy tables and codes to it. Wish I'd thought of this in the beginning. I know what I'm going to be doing now for ALL of my V9 applications that migrated from an early version. Like I'm sure many Alpha users, when I got an upgraded system (V7, V8, V9) I just copied the folder with the application and tables to another folder to be used in the new Alpha 5 Version (A5V7 Data, A5V8 Data, A5V9 Data). Not a good practice, but what I did. However, this process did separate my applications so I could easily revert back to an older version if I had problems with the newer version.

                    I hope my experience here helps other V9 Alpha users faced with iratic behavior.
                    Brad
                    Alpha5 User since Alpha4V3 ... Many years ago
                    Primarily using A5V10.5
                    Strictly an Action Script programmer (I don't grasp XBasic but wish I did!)
                    I have commercial software for insurance agencies, churches & general businesses

                    Comment


                      #11
                      Re: Editing a Field on a Form - Reverting to the previous value

                      I thought I had the solution, but re-doing the application was NOT the fix!

                      Everything worked great UNTIL under Database Properties I set the startup form which is my login window. My login window checks the Username and Password in the Staff table to make sure this is a viable user, creates a variable for the user, and then it closes the login window and opens the appropriate MainMenu form.

                      When this is not ran, I can change fields in the staff table just fine. BUT, once I run the login events from the Login window, I can not longer change the fields in the staff table.

                      Attached is an image of the events in this form and the Login Form/Window. The events are ran when the user hits "enter".

                      It first "conditionally" creates a variable called Vcct_User which is the core to the security for that user and numerous other things. The condition is ... lookupc("C", User_Code," password",table.filename_get("staff"),"staff_Code")=password

                      This basically checks to make sure the Staff_Code (User_Code is a field in Login.dbf the user enters his Staff Code) and Password (field in both Staff.dbf & Login.dbf) go together in the same record. You can see the rest of the events in the image.

                      This password system I personally created has been the back-bone to my commercial products and my internal systems and thus is a VERY important piece of coding to me. Considering this is the very thing that's causing the problem, I'm baffled. I can even setup which form they go to (ie, MainMenu or MainMenu-Brad) ... this feature has been very advantagous to me.

                      I just can't understand why these events are creating such havoc in Staff.dbf. My next objective is to one by one delete the events to see which event is causing the problem. I'll keep you all posted.

                      For you seasoned A5 programmers, if you'd like to see the code here to help me trouble shoot this problem, either send me an email [email protected] or a private message. I'm not wanting to put code from a commercial product out on the forum for just anyone to access. I have the appropriate tables and all in a new Application for testing purposes. The problem is unquestionably in the Login Events.
                      Last edited by Brad Chesnut; 06-16-2009, 06:03 PM.
                      Brad
                      Alpha5 User since Alpha4V3 ... Many years ago
                      Primarily using A5V10.5
                      Strictly an Action Script programmer (I don't grasp XBasic but wish I did!)
                      I have commercial software for insurance agencies, churches & general businesses

                      Comment


                        #12
                        Re: Editing a Field on a Form - Reverting to the previous value

                        Wonder if your custom login routines are leaving the Staff table locked, or open when it needs to be closed for other scripts? -- tom

                        Comment


                          #13
                          Re: Editing a Field on a Form - Reverting to the previous value

                          Tom,
                          I've looked at the events in the Login routine over and over again. Which would leave the table open or locked? However, if it's open or locked, I would think I'd get an error msg. Tom, I'm open to any suggestions you may have ... which of the events could leave a table open or locked?
                          Brad
                          Alpha5 User since Alpha4V3 ... Many years ago
                          Primarily using A5V10.5
                          Strictly an Action Script programmer (I don't grasp XBasic but wish I did!)
                          I have commercial software for insurance agencies, churches & general businesses

                          Comment


                            #14
                            Re: Editing a Field on a Form - Reverting to the previous value

                            Brad, there's no way to answer that without spending the better part of a half day examining your application. I mentioned the possibility in order to suggest to you that you might re-examine the form that's misbehaving to see if what you've scripted there is assuming that only one instance of the Staff table is open. Figured it might give you something to check that hasn't been considered so far. If that were true, then you'd be well advised to figure out what previous process locked or opened the table unexpectedly. The log in routines seem a likely candidate.

                            Comment


                              #15
                              Re: Editing a Field on a Form - Reverting to the previous value

                              I understand your point. What I still find baffling is this problem is only in the form I created.

                              I'll login using my login window which runs certain events depending on whether the Staff_Code and Password are in the staff table. If they are which allows me to login by taking me to a MainMenu, the events throws off the staff form and my ability to change any field on the form.

                              HOWEVER, I can go to the default form and change any field without a problem. How can an event in my login window be tied to a form associated to a different table? I just don't understand! Tom, this really seems like a bug in V9 to me ...

                              If I don't use my login window I can make changes on the Staff form I created. If I login using my login window I cannot makes changes on the staff form I created (won't retain the value) BUT can make changes on the default form for Staff. This is definately a "huhmmmm" moment, don't you think?
                              Brad
                              Alpha5 User since Alpha4V3 ... Many years ago
                              Primarily using A5V10.5
                              Strictly an Action Script programmer (I don't grasp XBasic but wish I did!)
                              I have commercial software for insurance agencies, churches & general businesses

                              Comment

                              Working...
                              X