Hello,
It's a simple task, but I am just stuck on writing the proper expression.
I have two tables in one Google Sheet, referenced together with unique "ID"s. I am using one, "EEs", as an employee record and the other, "History", to record the historical changes to the 'EE' table. So, if I want to change a date in the 'EE' table, I open the EE record and scroll down to "Add" under the EE table which opens the 'History' form where I enter the column to be updated and the update value.
Can someone please help with the expression to write to carry over the updated value from the History table to the appropriate column in the EE table and insert the value?
Here is the sheet: https://docs.google.com/spreadsheets/d/12JgGVkOjhMRwxjmXd1AKD1TdQVMp_mglN3k0xcMan9s/edit?usp=sharing
Any help is truly appreciated!
Daryl
This is not to directly answer your query because I do not know how to do what you are asking.
An alternative approach is to create a log table that simply records all fields on change.
This way a user does not have to add an entry per changed filed but can update multiple fields and record them all at once...
Thank you for your reply. Essentially, my History table is the log table. The question remains, when you save the data to the log table, how does the data then get inserted into the employee table?
After re-reading this and looking at your spreadsheet, I think you are using the data structure the wrong way for what you are trying to achieve.
If you didn't want to do that last part, you are going to need to over complicate the data structure and expressions to the point of absurdity (in my opinion).
Alternatively, you could have a crazy amount of actions/utilise INPUT() functions, but it appears that you have 20+ columns that you might want to update - which leads me back to my initial suggestion(s)
What I am suggesting is
1, Create an action to copy EE to History using "Data: add a new row to another table by using values from this row"
You can copy the entire EE row as well as a few other items like change datetime (=NOW()) and who changed it (USEREMAIL())
2. Set this action as the save event action of the EE Form
So you make changes to EE in the first place. No need to copy back from History
This actually isnโt too tricky - as usual at this time of night I am on my phone, but happy to help ๐
i have a few versions of this setup in different capacities. Using bots/automation is IMO the better way to do it.
@Ryan_Mortimer Now that you mentioned that you prefer an automation approach, I have given it some thought and I agree with you.
I have seen others including myself implement subsequent data updates using a Form's save event. This approach requires you to wait for all the actions to complete before you close the app in order to retain the integrity of your app, whereas a bot approach requires only the initial data change to be finished which is definitely faster. I have modified one of my apps to a bot and it seems to work very well.
Any other reasons why you prefer a bot approach?
(To be honest, I have been sort of avoiding bots because my free plan does not allow me to use scheduled bots and that also pulled me away from using bots on data change unless I am forced to... A bad case of preconception)
Hey @TeeSee1
I don't think that either way is more right or wrong, per say.
Mainly though, I make my judgement for automations vs actions
For example, in some industries, a failure to update one column or a group of actions not completing can cost thousands of dollars in errors.
I think that there are definitely use cases for your initial suggestion, and I think I may even look into this a bit more.
There are a few clicky, weird things with how bots work and how we interact with them, but they are definitely the way to go for most cases... you just have to get used to them and find some ways to stretch them around your task.
So, I did try this and it is where I ran into problems. This is what I attempted to do:
Any chance you could share a bot that you may have written that does this?
Than you!
Daryl
User | Count |
---|---|
15 | |
10 | |
9 | |
7 | |
3 |