Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8882957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:42:06+00:00 2026-06-14T20:42:06+00:00

I have read and re-read the docs ( here ) and here and related.

  • 0

I have read and re-read the docs (here) and here and related. Is there some other documentation that will help me get a better understanding of what type of permissions require what type of formatting, etc?

The puzzle I’m trying to solve is this: when someone edits a cell, I’d like the cell colors to be formatted based on the user who edited it.

It’s easy to write a code that works just for myself; however, I keep running into problems with permissions in getting it to work for another person.

Here’s where I get confused. I’ll explain my understanding, and I hope you can either correct me or point me to a document with more info. There seem to be 3 ways to make an event occur when a cell is edited: an Edit Event, a simple onEdit trigger, and an installable onEdit trigger.

To create a simple onEdit trigger, you create a new function named onEdit(). To capture an event, you put a string in the parentheses, eg onEdit(e). And then to access info stored on edit, you type something like var range = e.source.getActiveRange(). Simple event triggers have restricted security and cannot get the name of a user/activeUser, so I can’t use them to solve my problem.

To create an installable onEdit trigger that captures an event, you create a new function, eg myFunction(e). Then you get into script editor, click "resources", select your function from the dropdown, hit "from spreadsheet," and then onEdit. In this case, to access information about the event, you type something like var range = e.range.

This method is supposed to give more advanced permissions so that I should be able to go "variable user = e.user" and then "ss.toast(user)" to see the name of the user. However, when anyone besides myself does this, the toast is blank. Also, with this, I know the script "runs as the user who installed the script" but does that mean I can’t access the identity of the person who triggered the script?

To create an Edit Event, you… well… is this the same thing as creating a trigger? I guess I’m totally lost on this one.

So what happens if I cross my wires– for example, I name something myFunction(e) and make an installable onEdit trigger, but then instead of typing range = e.range I type range = e.source.getActiveRange? It seems to work the same for just me, but then have I crossed up permissions so that it will act like a simple event instead of an installable one?

The docs say:

"They may not be able to determine which user triggered the event being handled. For clock tick events, this is not important, but in a Spreadsheet edit event, the user changing the Spreadsheet would not necessarily be identifiable."

So… not necessarily? When would it work and when wouldn’t it? Is it possible in my case? How do I find out (besides my current, failing method of trial-and-error?).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:42:07+00:00Added an answer on June 14, 2026 at 8:42 pm

    The documentation around this is a little confusing, and we should work to clarify it. If you use a simple trigger and the effective user, you should be able to get what you want.

    function onEdit() {
      SpreadsheetApp.getActiveRange()
          .setComment('Last Editor: ' + Session.getEffectiveUser().getEmail());
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read all the docs I can get my hands on and google'd
I've read some docs about the .NET Garbage Collector but i still have some
I have read Oauth2 Docs but still am yet to get a start to
I have read in Chapter 4 of the NHibernate docs that all of a
I have read a load of the FB docs but I still can't get
I have read the docs and everything but I'm very confused. I never needed
I have read through the Rails docs for Routing , Restful Resources , and
I have read the HOWTO on Unicode from the official docs and a full,
I have read the Apple documentation, and many postings on the subject on SO,
I have read pretty much the entire documentation even beyond on the AWS AS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.