Log edits without showing username/timestamp

  • 0
  • 1
  • Question
  • Updated 4 months ago
  • Answered
Is there a way to use the Log Entry feature without it logging the user or time stamp?

I have two fields, "Related Job" and "Job History" in a table. Any time the key field of the table is modified I want the old entry in "Related Job" logged in "Job History" on a separate line. I have set up an Action to copy the entry upon modification of the key field but while this does work, if the key field is modified again it will overwrite the entry in "Job History", not add it to a list.

The Log Entry feature does log every single change but it also adds the user and time stamp records to the field which I'm not interested in. I just want a log of the old entries from "Related Job".
Photo of James Trory

James Trory

  • 806 Points 500 badge 2x thumb

Posted 5 months ago

  • 0
  • 1
Photo of Gil Spigelman

Gil Spigelman

  • 870 Points 500 badge 2x thumb
I have a table that I want to track several field changes. To accomplish this, I created a change table and add a child record to the main record each time one of those fields change.
Photo of Forrest Parker

Forrest Parker

  • 628 Points 500 badge 2x thumb
James, I would recommend the same thing that Gil did.  Create a child table to log the edits and use the action you created to add to that table.
Photo of James Trory

James Trory

  • 806 Points 500 badge 2x thumb
Thanks, can this be explain a little more? I don't quite follow how this works. How is this preventing the user and time stamp from being added to the log field?
Photo of Gil Spigelman

Gil Spigelman

  • 870 Points 500 badge 2x thumb
You will not be using a log field in the child table. You can track as many changes as you  want. Create the child table and join it to the table you want to track. So if Related Job is a text field, make it a text field in the child table. 

Create an automation that whenever Related Job is changed, add a child record with the new value. To start the child table, export all current values from the parent table and import it to the child table. This creates the first log of all current values. Then future changes are logged via the automation. 
What's the reason you don't want the User/Timestamp?
Photo of James Trory

James Trory

  • 806 Points 500 badge 2x thumb
Because I want to log the record, not who changed it. Who changed it isn't important. And I'd like to  parse other data out of the log field which is hard to do when it's covered in usernames and time stamps.
Photo of James Trory

James Trory

  • 806 Points 500 badge 2x thumb
I've hit a new snag which I'd love some help with if someone can.

I figured out what was being suggested above to log old entries. I have created a new table and the Action is now creating a new record into this new table any time the "Related Job" field in another table is modified. This helps me log any time "Related Job" is modified.

However here's where it's got a bit tricky. What I really want this to do is log every entry made into "Related Job", including it's current entry, as a new record but how do I do that?

The issue I'm having is that simply instructing the Action to "copy the old value" means that only the older entries are copied. The new one is not copied. If I add a second Action to copy the current entry, what happens is that it's now copying the new and old entries every time "Related Job" is modified, causing there to be duplicate entries because the current and old entries can sometimes be the same record.

I don't know if this is making any sense. In short, I want to log every record that is added to "Related Job" as a new record in a new table, including it's current entry, but only if that field gets modified.
(Edited)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 52,826 Points 50k badge 2x thumb
James, can you take a step back and explain in plain English what your objective is?  I think that we got lost in the weeds trying to answer your technical questions and lost site of what you are actually trying to do from a business perspective.
Photo of James Trory

James Trory

  • 806 Points 500 badge 2x thumb
Yes, sorry. I got a little carried away. :)

I work in a fashion photo studio. We produce thousands of images a day. Our QB app tracks the movement of each of these images through a series of post production processes. Each image (or ShotID) is assigned a JobID to provide information about when and where the image was taken. Many ShotID's can have one JobID.

If an image is ever reshot, for example to update a garment, the ShotID remains the same (as the key field) and what happens in the app currently is that the JobID for the existing ShotID is replaced with the new one.

What I'd like to start doing is track how often an image gets reshot, because I suspect it is more than a couple of times. To do this, my idea was that if a ShotID has its JobID modified the JobID would get saved to a new field or maybe even a new table. The intention being that I would then be able to say, "this image has had 3 different JobID's and has therefore been shot 3 times".

I am close to this. I have created a new table call "Reshoot". If a ShotID has its JobID modified, an Action creates a new record in Reshoot of the ShotID and the old JobID before it was modified (by using "Copy the old value from JobID"). This works great for saving every old JobID because it will continue to create new records in Reshoot every time the JobID is modified.

However, there's one bit its not doing and I'm completely stuck on. In order to be able to say "this image has been shot 3 times" I need to know in the Reshoot table what the current ShotID's JobID is as well as the other 2 old JobID's. That's the part I need help with. I want these added as a separate record as well, but if I create an Action to do it, every time the JobID is modified it is creating new records with the new and old JobID.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 52,826 Points 50k badge 2x thumb
I'm not understanding or maybe there is a KISS answer.

Is Reshoot a child to the Image table? If so, can't you simply make a summary count on the relationship to count the # of Reshoot records?

If that is the answer,  and all you need to do is to create that Relationship, just remember to have the Action also update the field on Reshoots for [Related Image]
Photo of James Trory

James Trory

  • 806 Points 500 badge 2x thumb
Yeah this is really hard to describe. Correct, the Reshoot table is a child of the Shots table.

What is happening is this, as an example:

  1. In the Shots table I have a ShotID called  1306426_alternate1.tif which has a JobID of  06072017_NYS5_UNREC_W_1806.
  2. If this ShotID has the JobID modified I want two new records in Reshoot created.
    A record of the ShotID (1306426_alternate1.tif) and the old JobID (06072017_NYS5_UNREC_W_1806)
    A second new record of the ShotID and it's new, modified JobID ( 12242017_NYS5_UNREC_W_1806).
  3. I can do this pretty easily with an Action. This leaves me with 2 new records in Rehoot for this ShotID because it's been shot twice. Perfect.
  4. Here's the problem: If this ShotID is modified again, the Action is going to add two new records again. It will add a record for what is now the the old JobID ( 12242017_NYS5_UNREC_W_1806) and another for the new JobID ( 02022018_NYS5_UNREC_W_1806).
    Problem is, what is now considered the old JobID (12242017_NYS5_UNREC_W_1806) has already been added once before when it was considered the new JobID.

Basically I want 2 records created upon the first modification of JobID (to log the original JobID and the new one) and then every subsequent modification should only get one new record created (the new, modified JobID). If I leave the Action as it is now, the JobID's start to overlap.

06072017_NYS5_UNREC_W_1806 (original)
12242017_NYS5_UNREC_W_1806 (new)
12242017_NYS5_UNREC_W_1806 (now considered "old")
02022018_NYS5_UNREC_W_1806 (new)
02022018_NYS5_UNREC_W_1806 (now considered "old")
07122018_NYS5_UNREC_W_1806 (new)

This is not something I have been able to work out. I've tried to add the JobID's to a ShotID as new fields instead of entirely new records but that doesn't really work either. The bottom line is, how do I handle that a JobID can be considered old and new at different times?

It's so confusing. If anyone is able to make sense of this you're my hero.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 52,826 Points 50k badge 2x thumb
Can you have the Action update a flag on the Shot ID to indicate that the Job ID has been logged.

Then have a condition on the Action to fire the Job UD log not to fire if it’s akready been fired once.

Note that an action can edit the record that triggered the Action. Ie the shot id table.

The trick is to create a Report link field that matches the record ID on the left side with same app same table /field [RecordID] on the right.
Photo of James Trory

James Trory

  • 806 Points 500 badge 2x thumb
This is something I'm still struggling to understand.

So are you suggesting doing something like adding a checkbox field as a flag to the ShotID to indicate that it has been recorded to the Reshoot table already? And then use that to make sure that any subsequent edit of the ShotID is handled differently than the first?

Note that an action can edit the record that triggered the Action. Ie the shot id table.


I'm interested in this but I don't see how I can edit a record within the same table using an Action.
(Edited)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 52,826 Points 50k badge 2x thumb
James, 

I was off cycling, so just catching up now with the Forum.  You can set up an Action to edit the record that triggered the action, by making a Report Link field. 

On the left side select Record ID# as the matching field and then on the right side navigate back to the app and then the same table and same Record ID# field.

Once you have created that Report link field it will be offered up when building the Action 
Photo of James Trory

James Trory

  • 806 Points 500 badge 2x thumb
Hi,

I see now. I didn't know I could create a report link between the same field in the same table.

I've created a report link in Shots to link the Record ID with itself which now lets me use that link to modify a field in Shots called Reshoot, to which I write YES (indicating that the record is flagged as reshot).

I still can't get this to work though. I need the Action to add two new records the first time the Shot is modified - one record for the new entry and one record for the old entry. Then, for any subsequent modifications, only record the old record.

The problem I'm having is that in an Action I can't specify criteria BEFORE a record is modified, only after. So I can't say "if a Shot already has YES in the Reshoot field, do not fire the Action".

I can do this with Automation, but I can't add old records after modification using Automation. I can only add new records. I can't find a good balance between using an Action simultaneously with an Automation.
(Edited)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 52,826 Points 50k badge 2x thumb
I'm only understanding about 75% of your setup so I'm offering suggestions that may give you ideas.

If you have an Action fire which updates a field [Reshoot] to yes,  if you change it from yes to yes, then that is not a change.  So if you have a 2nd Action setup to fire only when that Reshoot field changes, then it would not fire on the subsequent changes.  Does that help? 
Photo of James Trory

James Trory

  • 806 Points 500 badge 2x thumb
Hi,

I know, sorry this is getting quite complicated. I really do appreciate your help so far, I feel like I'm getting closer to the solution.

This is the process I want to try and achieve:

1. When a ShotID has the JobID modified and the Reshoot field IS NOT set to YES, create two new records in the Reshoot table - one with the old JobID and one with the new JobID.

2. Write YES to the Reshoot field of the ShotID (using the Report Link for the RecordID#).

3. When a ShotID has the JobID modified and this time the Reshoot field IS set to YES, only create a new record of the new ShotID in the Reshoot table.

So, first time the JobID gets modified add two records, every other time only add one record.

I'm still getting the problem where it is adding the old and new JobID records every time the JobID is modified.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 52,826 Points 50k badge 2x thumb
I think that you will need to use an Automation instead of an Action.  it has more flexibility in controlling when to fire and also it can then do many steps once the conditions have been met.
Photo of James Trory

James Trory

  • 806 Points 500 badge 2x thumb
I feel so stupid but I suddenly had the most amazing thought! Instead of trying to handle when and how records are recorded to the Reshoot table, why not just set the JobID field in the Reshoot table to be unique. That way when the Action tries to record two new records it will only record the new one and not the old one, which already exists.

It works. I can't believe it took me 2 weeks to figure that out.
(Edited)