Hello! I am building an app which aims to ga...

Hello!

I am building an app which aims to gather all possible data and keep track of all the changes that an user could make on it.

Therefore I created a system which automatically makes a row out of date and creates a new up to date row when a user changing any information in the app.

In fact, on the userโ€™s point of view, he is editing the information, but from our point of view, this new information is going to be saved and considered up to date, while the old row is out of date.

The problem is that I cannot track this information by the key (generated with the UNIQUE ID) since it changes everytime I copy this row.

Is there any possibility of copying the same key in this case, to allows me to keep track of all the changes made?

0 6 376
6 REPLIES 6

+Steve Coile Yep! Exactly!

@Vanessa_Mares_Porto Another thing that might make life easier is to mark the old record as archived after copying it for the new record, then you can easily differentiate (e.g. in a slice) current from historic records.

+Steve Coile Hi Steve! This second part I didnโ€™t understand very well. Could you explain me maybe with an example? Thank you!

@Vanessa_Mares_Porto Presumably, youโ€™re using actions to make a copy of the current record and make the copy available for editing. As part of that sequence, add a step to mark the old record as archived.

By way of example, suppose you have a simple record with the columns: [RowID] (the key), [BaseID] (for tracking history), [Data] (the data youโ€™re recording), [Archived?] (whether this record is current or historic).

[RowID] would have an Initial value of =uniqueid(). When the row is copied, each copy would get a new unique value.

[BaseID] would have an Initial value of =[RowID], so for the first record in a series, both [RowID] and [BaseID] would be the same. When the row is copied, the copy would get a new [RowID], but would retain the [BaseID] of the old row. All rows with the same [BaseID] value represent the history of the row starting with the [RowID] = [BaseID].

[Archived?] would have an Initial value of =false. When the row is copied, the [Archived?] value of the old column should be set to true, marking it as historic.

You might then have a slice that includes only current (non-archived) rows, using the selection expression: =not([Archived?]).

OK!! thanks +Steve Coile! I am going to try this!! Have a nice day!

+Steve Coile

Wow, great work!

TY!

Top Labels in this Space