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

Maintaining all changes to the data

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

    Maintaining all changes to the data

    I am rebuilding an Alpha database for a non profit that provides funds to residents of a county. If someone needs rent money, to pay the heat bill, or pay the electric bill they come to this office.

    Currently all info about the visit is in one table! So there can be a limited number of family members, etc, and you have to change data ( like last name changes ) and there is no record of the previous information. They want to keep ALL information.

    What i have so far is:

    General table Name, SSN, clientID
    Family table Name, Relation, clientID
    Address table City, State, clientID
    Visit table Need, Notes, clientID

    (please note, i've not listed EVERY field)

    So everything links back to the Primary Key General.clientID. I can have as many rows in Family, Address, and Visit as i want and link them to one applicant in General.

    I set up everything that way before i realized that the client wants to be able to keep everything. If John Smith comes in and changes his name to John Doe they want to be able to know that he was smith and doe. If he comes in with a different SSN they want to keep both.

    All I've been able to think of is creating a Control table with controlID and clientID and making General.clientID not a Key so that i can have something like this:


    CONTROL
    CID | clientID
    001 | 1
    001 | 2

    GENERAL
    First | Last | CID | clientID
    John | Doe | 001 | 1
    John | Smith | 001 | 2


    I'm sure someone here can come up with a better way. It gets kinda hairy going down to visits, family, etc...

    #2
    Re: Maintaining all changes to the data

    In my directory table I use 2 keys, one is a natural key and the other is a primary key. The natural key is what the user sees, but the primary key cannot be changed and provides the link to the other records. Thus if Jane Doe marries and becomes Jane Smith, you won't lose any links, even if you change the natural key from DOEJ to SMIJ (just an example) the primary key of D001 doesn't change.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

    Comment


      #3
      Re: Maintaining all changes to the data

      Thank you for taking time to answer!

      But I want to know that Jane Smith was once Jane Doe. I do not see how this will maintain Jane Doe.

      This is sort of like versioning. I need to be able to pull out every "version" of Jane Doe. Because Jane Doe might change to Jane Smith or Jane Jones. If 5 years they might want to pull out Jane Smith Data.

      Comment


        #4
        Re: Maintaining all changes to the data

        What about a 'changes' table that links the primary key to other fields where you look up the type of change and then enter the details into a general description field, and add a field for the date of the change.

        Then you can filter the table by the primary key and search by type and order by date in a browse or report.

        If you use previous values for the type field lookup, your users can add new types when they run into one. Or you can create a type table and let them modify that.
        Robin

        Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

        Comment


          #5
          Re: Maintaining all changes to the data

          Don't know if this is SQL table or not. If is is, then create a series of triggers in the sql table to add a row to a "log" table each time time there is change. The log file will then have all changes. I use that quite a lot
          Mike Reed
          Phoenix, AZ

          Comment


            #6
            Re: Maintaining all changes to the data

            sql triggers are similar to field rules.
            You can do the same there.

            You can have an extra table where those name changes are kept right along with the id number. A little bit of code and an on change to a name can add the old and new names to the table.
            Dave Mason
            [email protected]
            Skype is dave.mason46

            Comment


              #7
              Re: Maintaining all changes to the data

              Hi There,

              This article covers the control table idea in depth at: Database Development with Alpha Five v11 and MS SQL Server: Using Linking/Control Tables

              See if that can help you.

              Regards,

              Doron
              The Farber Consulting Group, Inc.

              Main Web Site: http://www.dFarber.com

              Avis Car Rental Application
              MS SQL Blog: http://www.dfarber.com/computer-consulting-blog.aspx
              Convert Ms Access to Web
              Custom Software Development
              Alpha Five Development
              No Interest Loans Application

              Comment


                #8
                Re: Maintaining all changes to the data

                Does anyone have an example of the "onChange"?

                I have read Dorons article and found it helpful, but not in my current conundrum. I will apply his advice to another part of the project, however. When it comes to tracking grant codes.

                In DaveM's comment he mentions another table for name changes. That table would need to contain fields for every field i wish to track changes, correct? They want to be able to track changes in SSN (typos, fraud, etc) changes in gender, marital , etc.

                Would it be wise to create an onChange that adds antother record with same clientID, different Primary key, different mod date, but copy all data from original record?

                Example:

                1 john doe 11.11.2011 male CLID1

                Changes name

                285 jack doe 12.12.2015 male CLID1

                Changes Gender

                58468 jane doe 10.10.2020 female CLID1

                So i could do select * from client where clid=CLID1 order by date

                and get all version of CLID1? How would i do the onChange? (I usually use php and mysql so this is a bit different for me.)

                Comment


                  #9
                  Re: Maintaining all changes to the data

                  1 way to do an onchange:
                  table with id and several other fields, you can use an onedit event of the record to copy all current data needed to track to a variable and write it to a record in the tracking table into a blob/large text/memo field with the id as a new or existing record. Then on save would do the same with the new changed data if the variable is not blank.
                  Means you could trace 1 field or 100 fields at a time.
                  Just a thought.

                  PHP is probably easier for this.
                  Dave Mason
                  [email protected]
                  Skype is dave.mason46

                  Comment


                    #10
                    Re: Maintaining all changes to the data

                    thanks for the idea. I wish they had the budget to let me do all that i want to do. php/mysql would be much easier for me.

                    Comment

                    Working...
                    X