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

Archiving

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

    Archiving

    I have a database for our front desk cashiers. They enter sales and payments, print reports etc. Each is assigned a suer code with password. I would like to log every transaction made every day and be able to later look at each user to see what transactions they keyed in. For example if a customer says that cashier Jane Doe took her money and did not enter the payment on her account, I want to be able to go to the log, search by date and user name and look up all transactions that that user made on that day. Any suggestions for a continuing log file?

    #2
    Re: Archiving

    This will involve a bit of work but it's not rocket science.

    1) The table structure for your sales and payments needs to include fields to record user name (or code) that entered the record, date (& possibly the time) the record was entered, user name (or code) that last changed the record, and the date / time the last changed occurred. These 4 fields can be populated by defining calc field rules. They shouldn't be displayed on the form. Examples illustrating this are available on the message board.

    2) A second table should be created to track the changes that may occur to a record in your sales and payments table. This table would permit the changes to be audited by a supervisor, and is sometimes called an "audit trail". Records in this table get populated automatically by addiitonal field rules defined in your sales and payments table. An example of this including all necessary code is published in Dr. Wayne's "Xbasic for Everyone" book available for purchase directly from Alpha Software.

    -- tom

    Comment


      #3
      Re: Archiving

      I use calc fields for creation date/time but I would almost NEVER make the last changed date/time calculated fields.

      A calculated field can be changed by too many things. BTDT - more than once! For example, a global update of all records to modify some other field would end up changing the last changed date/time on ALL records to "now". This is seldom desirable but, if it is, it can be included as part of the update.

      My preferred method is to put something like this in the CanSave record event of the table. That event is not triggered by most built-in operations. It is also not triggered by xbasic changes. NOTE that last sentence! If you do something in xbasic and want to update the last changed date/time, you must include the date/time update(s) in your xbasic script when using this method.
      Code:
      tc = table.current()
      tc.change_dtf = date()
      IF eval_valid( "tc.change_tmf" )
         tc.change_tmf = left(time(),5)
      END IF
      [COLOR=blue]'Following is used only if a *script* creates the record but doesn't include 
      'the creation date. This will add the "creation date" BUT only as the date of
      'the first change. It is only a "just in case" feature to get *something* in 
      'the create_dtf field as soon as possible.
      'You may not want or need it - especially if, unlike me, you never make mistakes.[/COLOR]
      IF tc.create_dtf = {}
         tc.create_dtf = date()
      END IF
      In fact, I do this so frequently that it's one of my keyboard macros. I just type jjchgdt and the macro types the whole script - comments and all. (Although I added extra comments here for clarification.)

      If you are concerned about "table.current()" pointing at the wrong table when using a set, don't be. Since it's in the table's own field rules, it will always point to that table - I've verified this with one of the programmers at Alpha. (Probably Lenny.)

      Comment


        #4
        Re: Archiving

        CALocklin, I tried that as you stated by putting it in the CanSave record event of a table. but I get the following error:

        Script:CanSave line:6
        tc.change_dtf = date()
        Property not found
        tc.change_dtf subelement not found.

        Then I saw your statement "you must include the date/time update(s) in your xbasic script when using this method."

        Being a relative newbie I did not quite understand what to put in and where.

        Comment


          #5
          Re: Archiving

          Harold -

          In Cal's script "change_dtf", "change_tmf" and "create_dtf" all refer to date or time field names in his current table. You are likely getting the error because your field names are different. Either change the field names in the script to match your table's field names or change your table's field names to match Cal's.

          - John O
          John Oesterle
          ToolBytes, LLC

          Comment


            #6
            Re: Archiving

            Thanks, CAL, for the reminder concerning the damage mixing calc field rules and table wide operations can cause. -- tom

            Comment


              #7
              Re: Archiving

              I understand that each transaction would have a date and time marker using the method shown by CALocklin, however if a dishonest cashier with a bent for theft decided to charge a customer, receive the cash payment, and then later on delete the payment by deleting the transaction, then the date and time marker for the transaction would be deleted as well and no history of this would be available. Assuming that the cashier does have the user right to delete transactions, how can I use CALocklin's process to create an archival history record different than the transaction record, each time that a transaction is made that cannot be removed except by the administrator. I would like every activity, including adding user names to the user name table, printing an invoice would create an entry etc. For example the history file might look something like this:

              USER NAME ACTIVITY DATE PERFORMED TIME
              JJones Payment to acct 10025 $100.25 5/6/09 13:31:21
              HSmith Invoice #506533 Printed 5/6/09 14:12:02
              DMazoni CHARGE for 10233 on Bill 12082 $20.00 5/6/09 14:13:39
              DMazoni CHARGE for 90255 on Bill 12082 $22.50 5/6/09 14:13:42
              DMazoni CHARGE for 1923 on Bill 12082 $5.00 5/6/09 14:13:57
              DMazoni CHARGE for 1233 on Bill 12082 $1.00 5/6/09 14:14:41
              DMazoni CASH PMT to 5233 on Bill 12082 $48.50 5/6/09 14:13:39
              DMazoni DELETE CASH PMT to Bill 12082 $48.50 5/6/09 14:20:04
              DMazoni VISA PMT to 5233 on Bill 12082 $48.50 5/6/09 14:23:27

              I hope that this gives you a better idea of what I am looking for.

              Comment


                #8
                Re: Archiving

                There is a built-in method for tracking transaction changes but I don't recall what name to search for in order to find it.

                If nobody can find it or if it doesn't do what you want to do, it's very possible to "roll your own" routine to either save the info in a separate table or in a text file. Depending on how many transactions you want to keep, the text file may eventually get pretty slow but I know it can take quite a bit before that would be an issue. Of course, neither is perfect - if someone finds the table or file, they can usually edit it or delete it unless you take more extreme measures.

                Before going into any of that, let's see if someone can think of the built-in method.

                FYI: The table doesn't have to appear in your control panel either - although you might want to at least add it during development. On the other hand, it's probably not a good idea to allow you users to have access to the control panel.

                Comment


                  #9
                  Re: Archiving

                  'Audit trail'

                  Built in: http://support.alphasoftware.com/alp...il_Feature.htm

                  And User built: http://msgboard.alphasoftware.com/al...ad.php?t=68530
                  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


                    #10
                    Re: Archiving

                    Harold, see point #2 in the second post in this thread. Dr. Wayne's approach uses a separate table to keep a record of all changes, including deletions. Works very well. -- tom

                    Comment

                    Working...
                    X