I have created a rubric that has cells that change color when "xx" is added to the cell. Rather than type into each individual cell when assessing my students I wanted to have the xx's get added to the cell from clicking ion the cell. That's when I started searching around and started to investigate scripts. I added 2 drawings to each cell so I could click on one image to add the "xx" and click on the other image to delete the "xx" (if I changed their assessment rating). I have played with them today and found success in the first cell, but every other cell that I try to assign a script to says that the script can't be found. When I "run" the script from the script file, it shows up on my sheet, but not when I click on the cell like I want.
Here is a section of my code for the first row of the rubric (I have 15 rows with different titles-Verbal Communication, Authority, etc.):
Top row of rubric pre-click
Top row of rubric post-click
[
function verbalcommunication4() {
ss=SpreadsheetApp.getActiveSpreadsheet()
s=ss.getActiveSheet()
var currVal=s.getRange("D5").getValue()
var plusVal= currVal +" xx"
s.getRange("D5") .setValue(plusVal)
}
function verbalcommunication4clear() {
ss=SpreadsheetApp.getActiveSpreadsheet()
s=ss.getActiveSheet()
var currVal=s.getRange("D5").getValue()
var text =s.getRange("D5").getValue().replace(" xx","");
s.getRange("D5").setValue(text);
}
function verbalcommunication3() {
ss=SpreadsheetApp.getActiveSpreadsheet()
s=ss.getActiveSheet()
var currVal=s.getRange("E5").getValue()
var plusVal= currVal +" xx"
s.getRange("E5") .setValue(plusVal)
}
function verbalcommunication3clear() {
ss=SpreadsheetApp.getActiveSpreadsheet()
s=ss.getActiveSheet()
var currVal=s.getRange("E5").getValue()
var text =s.getRange("E5").getValue().replace(" xx","");
s.getRange("E5").setValue(text);
}
function verbalcommunication2() {
ss=SpreadsheetApp.getActiveSpreadsheet()
s=ss.getActiveSheet()
var currVal=s.getRange("F5").getValue()
var plusVal= currVal +" xx"
s.getRange("F5") .setValue(plusVal)
}
function verbalcommunication2clear() {
ss=SpreadsheetApp.getActiveSpreadsheet()
s=ss.getActiveSheet()
var currVal=s.getRange("F5").getValue()
var text =s.getRange("F5").getValue().replace(" xx","");
s.getRange("F5").setValue(text);
}
function verbalcommunication1() {
ss=SpreadsheetApp.getActiveSpreadsheet()
s=ss.getActiveSheet()
var currVal=s.getRange("G5").getValue()
var plusVal= currVal +" xx"
s.getRange("G5") .setValue(plusVal)
}
function verbalcommunication1clear() {
ss=SpreadsheetApp.getActiveSpreadsheet()
s=ss.getActiveSheet()
var currVal=s.getRange("G5").getValue()
var text =s.getRange("G5").getValue().replace(" xx","");
s.getRange("G5").setValue(text);
}
verbalcommunication4 and verbalcomunication4clear work just fine. Every other script I try to attach to the drawings in the other cells attach with no error, but when I click on the object to run the script I get the error message "script function 'script name' could not be found." Like I said, when I run the script from the script project page the desired result (xx in the appropriate cell) appears, just not when I click on the cell's drawing like I want.
Top row after script is "run" from project page
Top row after cell E5's drawing is clicked
I'm new to this so any help would be appreciated. Thanks!