I’m trying to merge the data from 2 separate fields whenever they are updated into another field to keep a history of those changes.
The first field is date and time, the second field is a single select of location. Ideally, this information would just automatically copy to the next line down of a long text field whenever it’s changed.
I have no idea the best way to go about this. Thanks for your help in advance!
Solved! Go to Solution.
If I understand right - you want to create a new record every time the date/location is updated?
In such case, I think that a simple automation can help - you can see an example here
This won’t create a long text field but a list of changes in another table,
which you can link back if needed.
Just a note to endorse @Chen_Pro’s approach. I do this in a few places and it works well. Specifically, I have a number of automations that each watch a particular field. When that field is changed, it creates a new record in a table called Changes with columns:
Thanks for the response! I’m attaching some screenshots of how I would like it to work, I’m sure there’s a prettier way to do it but this is what I’m looking for. The first screenshot is just showing what fields I’m talking about and the second is showing how I’d like the data to look in the long text field. You’ll see that Item 1 went to Kevin’s on the 1st, Jeff’s on the 5th, and the Rock Hall on the 8th. That information would be copied to the long text field as it is changed.
commenting to flag so that i can come back to this after putting some more thought into it.
How did you get it into the field in your screenshot did you just type that in for examples sake?
i also agree with automation but it will have to be set up sort of specifically. happy to help just need some time to play with it.
you can insert script step inside (after trigger) and use output for step 3
i don’t learn yet how to work with date in JS, so i found some function, reconstructed and tested, and it worked, but for “ISO” format, YYYY-MM-DD , so you should change your field, or adjust the code.
regarding variables for input config(), i tried just “insert” field, but it wprked with zero arraay lenght, then did some fixes yet and it worked OK
sometimes “continue” - “uppercase(or capitalize)” works where “insert” - not.
but i’m not sure, maybe insert will work for you
p.s. for (let dt=date1; dt<=date2; dt.setDate(dt.getDate()+1))