Jump to content

kgraham2121

Members
  • Content Count

    3
  • Joined

  • Last visited

  • Days Won

    1

kgraham2121 last won the day on July 30

kgraham2121 had the most liked content!

About kgraham2121

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @kpcollier - Maybe a triggered action? I do something similar in an Audit Log/Audit Trail Process. We have a group of Yes No questions on a checklist our billing group uses. We log any changes to any of the questions on the checklist - including timestamp/user. I am not a trigger expert - but seems something to this effect would work: On update of record, if #inserted value of your'Take Me!' button field is Yes and Original value was No, then insert Userstamp into 'Assigned to' field. Hope this may help a little...
  2. Thank you @Glitch, 1 trigger per action really simplifies this - thanks for that direction. I'm on to the 2nd step - identifying changes and inserting into Details Table. I understand joinging #inserted with Source(Orders Table). I feel like I may need a 2nd join and I'm not certain where to do it. Let me explain: Desired output to Details Table includes: 1 record for each change for each Summary ID(Foreign Key)...i.e. user updates 3 fields in source table. Part I of trigger inserts into Summary Table - Stamping with Summary ID, plus Time and User Stamps. We want Part II of trigger to create 3 new records in Details Table - All with same foreign key(Summary ID - this is what I think I need the additional join for - to bring this ID over) - 1 record per field change. I can't figure out how to insert Column(Field) name that changed. Once I insert that - I know how to bring in Old and New value using the Join of #inserted and Source Table) Hope this makes sense...Appreciate your time, attention, and assistance...
  3. Hi, I'm trying to to created a triggered action that populates and Audit Log Summary Table (1 record per event - ) and an Audit Log Details Table ( 1 record per changed Field/Column). Workflow is upon Insert or Update to Orders Table want to Log Changes. Trying to keep Log tables as simple as possible. Assume following Table Structures: Orders Table: Accession ID (Primary Key) Editable fields 1 Editable fields 2 Editable fields 3 Editable fields 4 Editable fields 5 Last Modified - Timestamp Last Modified by - User Stamp Audit Log Summary Table: Summary ID (Primary Key) Accession ID(Foreign Key from Orders) Modified by User Modified Date Change Type (I, U, D) Audit Log Details Table: Audit Log Detail ID (Primary Key) Summary ID (Foreign Key from Summary Table) Column Name( Field that changed in orders table) Old Value New Value I know how to create the trigger to insert Accession ID, Modified by User, and Modified Date into Summary table upon Insert, Update, or Delete. I'm not certain how to stamp the change type field - based on Insert, Update or Delete. What I'm really struggling with is next step. For each event, how do I identify Fields that changed, and insert changes into details table? An would I be nesting this into original trigger in Orders table, or creating a new trigger in Summary Table? Pasting 1st part of trigger for reference. Any help or guidance greatly appreciated...
×
×
  • Create New...