Display matched dates from range - google-apps-script

I'm using a Google Sheet to track student check-in's at school. The office staff would like to have an easy way to display all logged dates for any particular student. I would like to use Apps Script to programmatically display the information because vlookup and index/match get dicey with large data sets.
The problem is I can't seem to find a good solution using Apps Script:
You can't run a script from a hyperlinked cell ("Get dates" or something similar to display a popup based on the row index)
Comments/notes cannot be inserted in Apps Script
Using Sheets formulas, wrong data is returned because of the high number of log entries.
Is there another method I'm missing? Any ideas on how to accomplish this?

To insert a note use range.setNote(note)1
1: https://developers.google.com/apps-script/reference/spreadsheet/range#setnotenote

Related

Use Google Script to Edit a Google Sheet-- Help, beginner level

I would like to use google apps script to do a couple edit moves to a google sheet report I get everyday:
merge two pages of the same google sheet together (two of the tabs)
delete the first row (report gives a blank first row I would like deleted)
delete 26 of the 44 columns (there are different columns I don't need)
delete rows with that have a specific customer name
filter order numbers from ascending order
I am learning how to use google apps script and I have beginner level experience with SQL and R, but I feel like all the references for google apps script are overboard for what I would like to do. Thank you for help!
I have been reading so many things online, but like I said before it just seems overboard for where I want to start. If there are any good resources I should look into sending those over is super helpful!

Prevent a google sheets IF(TODAY()) function from editing after a certain date

I'm trying to build a google sheets cell that updates after a certain date.
The function I'm using is =if(today()=oct 4, count(A:A)) which will just count rows. The only issue I'm encountering is that the A:A column updates regularly and I want it to just be static.
Ideally on october 4th the A:A column would be counted and it just get turned into a static value.
Not sure if a complete apps script would be the better option.
Since you cannot automatically fix values using a formula, you need to use apps script. Ideally use an apps script which contains a trigger depending on your needs, as I assume that you do not only have a single instance where you want to fix the values from the formula. If you are clear about what you want to achieve then the community can help you. And we always appreciate if you've tried doing t yourself in order to see your effort.

Is it possible for a GAS script to lock a Google Sheet so nobody else can alter it until the script is done

I am familiar with the Lock Service but that is only for locking scripts.
I have some code that will "process" a large Google Sheet. My script needs to re-order the rows. I need/want to make it so while the script is running nobody else can change the order. However, I still need another script to be able to append rows.
We use a Google Form for our team's intake. It appends rows to a sheet. I have an hourly job that will go through all the rows/records and "process them". I have a column that stores the last time a record/row was "processed". I want to sort on that column such that the "oldest" records are on top and then start processing from the top down. If the script fails or times out then the next iteration will just start over...
I know I could use getValues or getDisplayValues to get an array and then write the array back but I worry what would happen if someone sorted the rows as it would muck things up when writing the array back.
Is there some way to accomplish my goal? I want to be able to process the records, and maintain row order to avoid breaking my processing.
The way to block a spreadsheet "completely" is by changing the spreadsheet sharing settings. Remove all editors or change them to viewers, once your script finish, change them back as editors. In a extreme case, usa a second account to act as the owner of the critical files / spreadsheets and only use it for this purpose,so you could block your regular account for doing changes to the spreadsheet.
NOTE: A Google Form editResponseUrl could be used to edit the linked spreadsheet.
I'm facing a similar situation but I took a different approach, I'm using an index/key column (you could use the timestamp column) and using the index/key to save each edited row to the right position, then write the whole resulting array in a single operation (by using setValues()). In my case this is simple because I only require values, I'm not worried about notes, data validation, conditional formatting, comments, etc. and there isn't a Google Form linked to my spreadsheet.
Related
Google Spreadsheet -- get sharing permissions by script
Any way to share google docs programmatically?

Delay in changing Google Spreadsheet content via Google apps Script?

I am totally new to Google-apps-script and this may be very poor question
I am making a basic setup using google forms and google apps script
From the responses of form I change my content in Google Spreadsheet accordingly
For example my query from form needed 10000 records to be selected and produced in whole another spreadsheet
I just wanted to know that is there some kind of delay introduced when I set and get values of any cell of spreadsheet on such a large scale? If so on what it depends and how as a programmer can I remove or optimize them?
Thanks is advance!
The Best Practices article by Google is the primary reference for this. The most important advice is to minimize the number of calls to spreadsheet methods by batching operations. So, select a range that contains all the records you need, get them all at once with getValues, process without further interaction with the spreadsheet, and output the result using setValues.
If you follow this advice, 10000 records is still a reasonable amount of data to process by a script.

Google Script for Spreadsheet - how can I prompt the user to select a range?

I've been doing a lot of work with Google Script to automate some peer evaluation processes.
One result is a spreadsheet with a lot of review data that I need to sort, group and summarize. The script is working fine for the hard-coded sort column.
But I really want to be able to sort on different columns at different times, and I'd like the sort/group/summarize script to prompt the user to select the sort/group column at runtime.
I've explored the UI stuff a bit, but I haven't seen how to prompt the user to select a range (or column or anything else) on the sheet.
Thanks in advance.
I know you are not supposed to post links as answers, but sometimes it just makes sense.
This answer gives a complete solution that I have not tested.
https://stackoverflow.com/a/45427670/188963
This post also describes something similar.
https://medium.com/#piyush.goel/how-to-build-a-range-picker-in-google-apps-script-to-populate-a-text-field-in-the-sidebar-in-google-6bbd4f80d4d2
A simple way to communicate with user on a spreadsheet is to use the Browser.msgBox or Browser.inputBox to indicate that you expect a column / range to be selected. You can then find out which range is selected and compare that with your expected selection choices.