0

Regarding 'history' issues.

I found that when using the history function (cloud-based), the backup history records were not selected for backup, so there are no previous creation and modification records now. I want to change the content of a text in the database from 'apple' to 'banana'. The history record will only show that the text was changed to 'banana', but I want it to show that it was changed from 'apple' to 'banana'. Is this achievable in the code?

6 replies

null
    • Mel_Charles
    • 1 mth ago
    • Reported - view

    I don't think you have that kind control over this is as it is Ninox System controlled and thus shows you only that record x was modified. I think if it was any deeper than this that would have an onerous impact on the History file sizing. (unless there is a hack that can be done?)

    If you were talking about just one field you wanted to track I guess you could add a mirror field and tuck it out of the way. Then have a trigger to copy the data from the original field just ONCE! (ie if field 2 is null then copy field 1 else do nothing so your can compare the two fields and have both showing on the history. But I suspect this will be far from perfect and would be terrible if you want track the change in many fields.

    I do have a number field that tracks one of my fields to state how many changes have been done to it, but of course this just state the field was changed X times and not tracks the actual text detail change.

    I have that filed on a hiddon tab and then ref with a formula so I can style it. shown below (Edits). it actually tracks how many time s an operated has updated JobComments throughout at each production stage 

      • gold_cat
      • 1 mth ago
      • Reported - view

        Thank you for your reply. Indeed, I have experimented with it and found that this code can only be written to be triggered ‘after the change’, but it cannot record the value before the change.

    • Fred
    • 1 mth ago
    • Reported - view

    One possible solution is to use a dashboard for your users to modify data. I think it is best not the let users modify the raw data directly. Then with the click of a button you can make your own history table and track all of the data you want.

      • gold_cat
      • 1 mth ago
      • Reported - view

       Yes, this is a relatively limited solution.Thank you for your reply. 

    • John_Halls
    • 1 mth ago
    • Reported - view

    Hi I would suggest adding a button with a script that updates the value of your text field to a different value and then puts the original value back in. That way it will have been saved to history ready for you to change

    let a := Desc;
    Desc := "History Reset";
    Desc := a
    
      • Mel_Charles
      • 1 mth ago
      • Reported - view

       Okay - that's a neat idea  🙂 

Content aside

  • Status Answered
  • 1 mth agoLast active
  • 6Replies
  • 54Views
  • 4 Following