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

Logging Changes Made

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

    Logging Changes Made

    Hello all,

    I have come across a situation where users of my application need to be notified of changes made by other users of that same application.

    I have come up with a solution but it doesnt work to the desired effect:

    Situtaion: When the supervisor logs in and makes changes to the form the values he enters in the fields will turn to red and bold color. So that when the other user (clerk) opens the same record in a form those values are differentiated with the bold red color.

    Solution that did not work: I semi-accomplished this by writing code for the onchange event for each field on the form that goes like this:

    -----------------

    if user_groups()="Manager_Supervisors" then
    this.font.color = "red"
    this.font.bold = .t.
    topparent.refresh_layout()
    t1 = table.current()
    t1.Updatedby = user_name()

    end if

    -----------------

    Then I used the field properties of each field to construct color and font properties such that the font and color would be bold for the field if the following expression would be true: GARDENING->Updatedby""

    However, my problem lies in the latter part of the method. When this method is applied to all fields on the form and any one field is changed by the supervisor, then when the clerk opens the same record in the form all fields become red and bold. I know exactly why this is happening: because even if one field is changed then a value is being entered into updatedby field for that record and the field properties of that record checks the "updatedby" field to make the judgement to bold and color the field.

    HOw can I overcome this such that the application would know if the supervisor made changes to a field on the form and then make that fields font bold and red if the clerk opens to view that same record?

    Please help me. Any ideas would be appreciated. Thank you

    #2
    RE: Logging Changes Made

    It seems to me that you'll need an "updated by" field for EACH separate field on the form. Your present approach supplies a single "updated by" field for the form as a whole. To change the color of a single field Alpha needs to know who last modified it, and it alone.

    -- t

    Comment


      #3
      RE: Logging Changes Made

      Thanks for the prompt reply Tom. I was afraid that someone would reply back with this solution. It seems so cumbersome that in order to simply figure out if a field in a table was changed the solution would be so involved.

      Does V6 offer another approach that simplifies the situation? Perhaps even, a function which can be used or manipulated to figure out if the value of the field was changed by a certain group member?

      I just want to avoid creating extra fields in the application which would inturn add size to the database as a whole.

      Actually, I really dont care who (username) has updated the field (just the fact that he was a member of a certain group) or what the last value of the field was; therefore, I think i can avoid creating the "updated by" much less "last value" or "new value" fields for each existing field of the table.

      How about this: if the field was updated by a certain group member then to the the users of the "clerks" group that fields name would appear in a Rich Text on the form? Would this work?

      Hypothetical Solution: The onChange event of each field would monitor the usergroup making the change and the onDepart would add the field's name to the Rich Text on the form. The rich text would be viewable to only the members of the clerks group. Which would inturn show the name of the field that was last changed by a member of the supervisor group.

      Comment


        #4
        RE: Logging Changes Made

        Raheel,

        In light of the additional information you've furnished, I'd recommend something MUCH simpler (At least for your text fields). I'd embed a visible marker or code in the field value when it's entered or changed by a member of the supervisor group. For example, if the actual field value is "Apples", I'd add a prefix "*" automatically if the field is entered or edited by a supervisor. All users would see "*Apples". Instantly they could see both the actual field value, and know that the field value came from a supervisor.

        Embedding a code like this violates database normalization rules. However, it may be a practical solution for you.

        -- tom

        Comment


          #5
          RE: Logging Changes Made

          I agree with Tom. The only way to determine what type of user updated a is to have a flag somewhere in the table stating WHO did the last update. How about setting up a 1 character field which is calculated. The value of this field is changed based on the person or group modifying the corresponding form field. In this way, you could set up the field properties to chech these flags and then set font color and properties based on the flag.

          It would be no fun to set up, but once done, it should be pretty automatic. The logic is fairly simple,and it is the same for every field and flag.

          Tom

          Comment


            #6
            RE: Logging Changes Made

            I think that is a great solution and would suffice my needs perfectly for forms and viewing data but then this solution would give a lot of problems in the reports that I have for the tables.

            First of all all fields in the table are numeric, secondly all fields are being used for calculations in reports...

            For example, I make it so that it autochanges the fields value with a preceding "*" for every field that a supervisor changes but then I have a report that calculates the total's for each field and the extra "*" symbol would inevitably create errors in the calculations.

            Hmmm...i dont know what else could be done, but I am surprised that although so simple this task is to the mind it is becoming so difficult to implement. I would think that it would be a fairly common practice in a database to know who was the last user who updated the fields.

            Comment


              #7
              RE: Logging Changes Made

              ""I am surprised that although so simple this task is to the mind it is becoming so difficult to implement. I would think that it would be a fairly common practice in a database to know who was the last user who updated the fields.""

              Not so. In my experience a very common requirement is to log the date, time, and identity of the last person to change the RECORD. You're trying to log changes to individual FIELDS, a very different, and unusual, requirement. Your design essentially requires two tables to be maintained. One to record the values in each field, and another to record the category of user who made the last change. Your specifications double the complexity of your application.

              The suggestions made thus far are simple, but tedious and time consuming, to implement. Once in place it should run automatically and transparently for the user.

              If the benefits of knowing when field values were last entered by supervisors outweigh the time/cost of implementing a field by field solution, only you can your client can say.

              -- tom





              Comment

              Working...
              X