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

Special Info

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

    Special Info

    Can I get the user information and place that in a field during data entry.

    If so the next step is can I do it if a record is modified.

    Apparently the system(Alpha 5) I have set-up sucks. However I think I am being sabotaged by an angry employee. I want to track what is being done by whom to save the rep of A5.

    Let me know please.

    Note: I am not a real power user so be clear

    Thanks alot

    #2
    RE: Special Info

    Bruce,
    I don't know how you deal with users on your system. So I'll assume that the user ID is located in a global variable called userid. You could add a field to any Alpha table called user. In the on enter event of a form you could place an in line xbasic line of code that says:
    user.value = var->userid.

    If the userid is a global variable that is always present, I believe you could have a field rule for the user field with var->userid as a default. In either case you can make it invisible to your users but visble to you for later analysis.

    Comment


      #3
      RE: Special Info

      There is a system variable "A_FIELD_VALUE" which is assigned in enter or change mode and is the value entered into a field before either the cursor leaves the field or the record is saved. You could save the the old info and the system variable in a different table along with the userid of employee. I am not a power user either, this is something I read.

      Comment


        #4
        RE: Special Info

        Bruce
        I believe there is an article on Dr. Peter Waynes website
        that has a program with the information you want.

        www.learn alpha.com

        Jerry

        Comment


          #5
          RE: Special Info

          One thing I do is to make everyone log on. The Name log on field is a global varable and the password is also a global variable. It searches the user table. If there is a match the user is able to see his/her menu choices.

          Then in all my tables I have 6 additional fields:
          UserE for user entered
          UserChngd for user changed
          DateE for date entered
          DateChnged for date changed
          TimeE for time entered
          TimeChngd for time changed.

          Then in Field rules the *E fields are assingned the default value of the global variable for thier logon on name, date, and time. For the *Chngd Fields they are calculated fields based on the global variable for thier logon on name, date, and time.

          These all work in the back ground the user never sees them. Then when a user starts complaining I go look at that record and see who did what and when.

          I had one employee who kept adding records to my inventory to make my inventory inaccurate. He got pretty embarassed when I pointed out what he did and previously denied it.

          Hope this helps
          Dan
          Dan

          Dan Blank builds Databases
          Skype: danblank

          Comment


            #6
            RE: Special Info

            Dan,
            That's pretty clever (or pretty sneaky - depending upon your point of view). I guess the one weakness in your method is that "UserChngd" only records the very last person to change a record. So there is always the slight danger of blaming the wrong person for the saboage. I suppose a fanatic could use the OnSave event to send your info to a special table to record changes and saves for all tables. Come to think of it, I guess there is a lot of ways to track what users do - for better or worse.
            Peter
            AlphaBase Solutions, LLC

            [email protected]
            https://www.alphabasesolutions.com


            Comment


              #7
              RE: Special Info

              Hi Peter:

              You don't need to be a fanatic ..... not long after we released the first version of our appointment scheduler we started getting calls from a particular client alleging that appointments were disappearing regularly from the scheduler. "The patient just showed up and there was no appointment in the scheduler ..."

              Almost immediately I put in a separate table to record all deletions (coded for who, when, appointment details and nature of deletion. In the scheduler appointments are deleted (in a clear) or deleted and re-created (during modifications and reschedules) so it's important that we can determine how and why a record was deleted. We also have a table to separately record the details of all saved appointments, again with who when etc.

              I wouldn't be able to sleep without those tables as they enable us, in the vast majority of cases, to clearly determine exactly what has transpired and show that, when an appointment disappears, it's usually because a user cleared it deliberately. However, without the table we'd have a hard time defending ourselves from careless or forgetful staff members or mischief makers.

              BTW, those calls stopped right after the first time I was able to go back in and say "That appointment was cleard by you on .... at ...."

              Finian
              Finian

              Comment


                #8
                RE: Special Info

                Hi Peter:

                You are correct about the records being changed more than once and maybe blaming the wrong person, however, in my case it was a person adding records to show my inventory greater than it was. So that is where the user entered field paid off. Also with inventory I sort of treat my main inventory file like a general ledger file. Additions and subtractions have to be made through a receiving module and a shipping module.

                Another method of deducing changed records is with daily backups. When a problem surfaces you check the changes made against the back ups. Then through deducing you build a trail of all the changes.

                As for deletions, the user can delete records, but only the database administrator can pack the tables. So the database gets backed and archived, up before it get packed. Then I can go back an undelete any records in the table. Again leaving myself away to build an audit trail.

                Of course A5v5 will make the audit trail a lot more user friendly. That will be nice.

                Dan
                Dan

                Dan Blank builds Databases
                Skype: danblank

                Comment


                  #9
                  RE: Special Info

                  I get the feeling you really want to get the Windows user name. This would require using a Windows API call. I don't know if anyone on this board has ever fully implemented this. The closest I've seen can be found by searching for: (cut and paste this to the search box)

                  declarestruct gary smith

                  Comment


                    #10
                    RE: Special Info

                    Cal,

                    I have tried a variety of user information API calls with varying results depending upon A5 version.

                    Ver 4.03 almost always fails (and once fails, requires a reboot to clear things it seems)
                    Ver 4.5 seems to work with some things, but still fails others
                    Ver 5.x seems to work all the time.

                    This includes things like the windows directory, System directory, Temporary directory, User name, Computer Name, and similar.

                    I have a DOS program that gets all this info (including the MAC address and workgroup) but there are issues calling the DOS program from A5 depending on which Win OS you are running.

                    Regards,

                    Ira J. Perlow
                    Computer Systems Design & Associates
                    [email protected]
                    Regards,

                    Ira J. Perlow
                    Computer Systems Design


                    CSDA A5 Products
                    New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                    CSDA Barcode Functions

                    CSDA Code Utility
                    CSDA Screen Capture


                    Comment


                      #11
                      RE: Special Info

                      The GetMachineName function available on www.learn alpha.com works consistently on Win NT and Win 2K so that might be a possibility also.

                      Finian
                      Finian

                      Comment


                        #12
                        RE: Special Info

                        Hello again Dan & Finian,

                        You both are right of course. Don't take my use of "fanatic" too seriously. I can appreciate the necessity of an audit trail. I've been lucky in my company - lots of honest mistakes and no saboteurs as of yet. But gradually, I am tighteneing up my application. I have been doing this part time for about 10-years, and finally I am learning the right way to build (im my case rebuild) an application. I wish I had learned from all of you about 5 or 6 years ago. My usual method in most endeavors is: Build it once, tear it apart, and rebuild it - this time the right way. Whew! Live & learn, if ever so slowly.
                        Peter
                        AlphaBase Solutions, LLC

                        [email protected]
                        https://www.alphabasesolutions.com


                        Comment


                          #13
                          RE: Special Info

                          Hi Finian,

                          I can't find it and I even remember reading it. Can you help?

                          Thanks,
                          Bill
                          Bill Hanigsberg

                          Comment


                            #14
                            RE: Special Info

                            Hi Bill:

                            I don't remember the name of the article but a search on DeclareStruct would probably find it.

                            In the meantime, here's the version (written by Peter Wayne) that I use:
                            '===========
                            function GetMachineName as C()
                            declarestruct text c255text
                            declarestruct length L1length
                            Declare kernel32 GetComputerNameA L(text)(length)
                            temp.text="" 'create a dot variable, or pointer, to text
                            len.length=255 ' do same with length
                            result=GetComputerNameA(temp,len) 'pass 2 pointers to GetComputerNameA
                            GetMachineName=temp.text
                            end function
                            '=========

                            so the line
                            name=GetMachineName()
                            will return the Computer name.

                            Finian
                            Finian

                            Comment


                              #15
                              RE: Special Info

                              Thanks Finian for the post.

                              I too have been looking for a copy of the function script. Just tried it on a computer running original version Win95 and it returns the correct value. I am also going to test it on other computers running Win98 and WinME to see if any problems occur.

                              It sure will be useful to easily track users in a networked app.

                              Jerry

                              Comment

                              Working...
                              X