Google Sheets Script To Check Changes From One Sheet File To Update Another Sheet URL - google-apps-script

Apologies if something like this has already been asked, I have little to no experience with this.
Is there script that can check a Google Sheets workbook for edits to then affect a different Sheets workbook. I have found something along these lines but it always references the same workbook and moves the entire row.
I have a spreadsheet that contains multiple lists of users (Sample Move) and another staff member has a sheet containing activity status and other details (Sample Edit). When a user is placed on the Sample Edit spreadsheet, they would then need to be moved from their respective Active list and moved to the corresponding Inactive list. Users would not need to be automatically added back to the active list once they return, that would be a manual process.
Link to example Sample Move: https://docs.google.com/spreadsheets/d/1q3yRMa5sum8dHLyw_2ppLaWBUEoj_Gl6F_btWIiqsfw/edit?usp=sharing
Link to example Sample Edit: https://docs.google.com/spreadsheets/d/1IZzoJQkFsavgnjkwz1GkuwDj-m6kG-CYQfLKx2EmPSI/edit?usp=sharing

Related

Link to a google sheets value

Background
I have a google sheet to which I regularly add rows. Each row has an identifier column that remains constant (e.g. the row's "Title"). Rows change positions as I sort the spreadsheet on a column (e.g. the row's "Value").
For each row, I have an associated google doc with extended narrative about the content of the row. The content doesn't belong in the sheet.
The ask
How do I add a link to the google doc such that when I click it, I'm taken to the corresponding row in the google sheet?
What I've tried
I can create a link that specifies a cell in the sheet (like "A1"), however as I add rows and re-sort the sheet, the link no longer points to the correct row.
Thoughts
Can I create a google sheet link that performs a query or filter? In this case a query that searches for a title. I expect it to look something like,
https://docs.google.com/spreadsheets/d/ssid/edit#gid=sid?query=equals('Title', 'MyTitle')
Does this need to be something for which I create a google apps script that's present in the google doc?
Thanks
Can I create a google sheet link that performs a query or filter?
Yes, but it won't take you to the Google sheets file itself. You can create a custom html link. The end point is /gviz/tq. Query can be added with url query parameter tq(say "where A="mytitle") and format can be added with tqx(say html). The link should look like:
https://docs.google.com/spreadsheets/d/${SPREADSHEET_ID}/gviz/tq?tqx=out:html&tq=where%20A%3D%22mytitle%22
out:html uses cookie authentication and should work with private files(when logged in), while out:json requires oauth access tokens.
References:
Request format
Spreadsheets to gviz

Sharing google sheet with restrictions

I've built my google sheet, and shared it with the team, the sheet has an entry point, where the user is entering some data, and balance data of the sheet is changing dynamically based on this input.
If 2 persons are using the sheet at the same time, the data will be changed based on the last guy who use this entry field, and the data the other guy seeing will be changed accordingly.
my sheet is here
The sheet is locked except the yellow shaded cell, which is allowed to be changed by the user.
Is there a way to allow each user to see the data based on his input parameter, without getting it destroyed when used by others!
I don't think what you're looking for is possible as Sheets is designed to be used for collaboration and edits will always be shown in real time. Consider adding multiple sheets and assign them to each of your team members with the exact formatting and formulas as the original so they can access and input their data independently.

In Google Sheets, is there a way to see when a cell was populated?

I've got a spreadsheet that has data added to it sporadically. I'd like to know when data was entered into certain cells.
Is there a way to find the date when a cell was populated?
Note: there are several thousand populated cells, so just looking at past iterations of the entire sheet is not going to work.
Right click the cell and then select "Show edit history"
Reference
View the activity on your Google Docs, Sheets & Slides
Related
GoogleSheets - Is there a way to extract user info from "show edit history" to a cell?
Is cell edit history accessible programmatically in Google Apps Script?

Displaying different texts to different users

I would like to have a Google Sheet that will display a hyperlink to users, but this hyperlink is unique to each user. I managed to make it work, but then realize that when multiple users log in at the same time, there will be a problem (last user's links will be displayed). How can I resolve this?
I have already managed to create a sheet that will display a link that is customized for each user using vlookup to a table with first column user emails, and second column the unique url. I then use the onOpen() function to include a line of code that will set the value of a cell to the user's email, and it is this cell that the vlookup refer to.
Basically, on Sheet1 I have a cell with the formula:
=hyperlink(link1,text1)
link1 and text1 are named ranges referring to two cells in another Sheet2 that are customized using a vlookup to a table, and referring to a cell which contains the current user's email (obtained through onOpen() function).
I hope that each user can see a link customized to them and which they can click on and be led to their own customized page. However, when multiple users log in around the same time, the cell which the vlookup functions refer to is quickly overwritten by the latest user who opened the sheet. Is there a way to do this so that everyone really sees a customized link and the link persists for each user? I am game to consider options beyond Google Sheet.
... then realize that when multiple users log in at the same time, there will be a problem (last user's links will be displayed). How can I resolve this?
As it was already mentioned on a comment, it's not possible to show a different cell content to users that are accessing the same spreadsheet at the same time because the real-time feature of the G Suite Document Editors.
Among other alternatives, you could use Google Apps Script to create a menu to open a dialog/sidebar to show the personalized hyperlink or to automatically open the linked page.

Automaltcaly copy rows from one Google sheet to another

I have Google sheets that are tied to Jotforms. I would like to build a script that, when a submission is made, the contents of the newly created row are automatically copied across to another Google sheet, apending at the last row.
Can anyone help with the triggers and code that moves the data across and places it in the first free row.
Take a look at onEdit() functions. It will fire whenever a submission is made to the sheet. Then you can just get the active cell, and triangulate the rows data using a getRange() based on the cell that's active. Paste it into the other sheet and you're golden!