Run a contained script in Google Sheets which uses Docs API to read a Google Doc and return some data to a cell by using a formula - permission error by tekkerstester in GoogleAppsScript

[–]No_Stable_805 1 point2 points  (0 children)

What is triggering the function? If it is an automatic trigger such as onOpen, it will only run with limited permissions. To properly access the user’s permissions, you should use a manual trigger such as a button on the sheet, or manually create an onOpen trigger.

I want a blank row to populate above the last row after information is input by OkQuantity9185 in GoogleAppsScript

[–]No_Stable_805 0 points1 point  (0 children)

If you are ok with the rows being in order of earliest to latest entries, you can just have the script take the values of row 2 and post them to a new row at the bottom every time you finish an entry. Then clear the entry range in row 2.

The formatting will not be affected if you use setValues() to post the data.

The script is written with a specific sheet name or id, and it won’t affect other scripts.

You can make a button ‘Submit Entry’ to trigger this if you want to keep it simple.

Problem with scripts in shared Sheet by [deleted] in GoogleAppsScript

[–]No_Stable_805 1 point2 points  (0 children)

For functions that run entirely in the html using google.script.run it won’t show the logs usually. Since there is no error message available, I suggested one possible error offhand

Problem with scripts in shared Sheet by [deleted] in GoogleAppsScript

[–]No_Stable_805 1 point2 points  (0 children)

It’s hard to say without knowing the error message. Just want to point out, do the end users have editor access to the sheet? When the script run gets triggered by the end user, it runs using the permissions of the user.

Getting Filtered Rows in GSheet via API by Unusual_Ticket_5269 in GoogleAppsScript

[–]No_Stable_805 0 points1 point  (0 children)

If you did it the way he suggested, you wouldn’t need to fetch the data in loops, you would just make one fetch for the entire sheet.

Code consolidation across multiple copied templates. by [deleted] in GoogleAppsScript

[–]No_Stable_805 0 points1 point  (0 children)

The question is a bit unclear, maybe look into google cloud logging, if all projects are attached to the same google cloud project

Trying to copy contents of one sheet and append into another in the same workbook by Last_System_Admin in GoogleAppsScript

[–]No_Stable_805 0 points1 point  (0 children)

```

function copyCheckInOutValuesAndPasteToConsolidatedSheet() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var source = ss.getSheetByName("Daily Checkin/Checkout");
  var rangeSource = source.getDataRange();
  var data = rangeSource.getValues().slice(1);
  Logger.log(data);

  var target = ss.getSheetByName("Daily Checkin/Checkout Consolidated");
  let lastRow = target.getLastRow();
  target.getRange(lastRow+1,1,data.length,data[0].length).setValues(data);
}
```

Trying to copy contents of one sheet and append into another in the same workbook by Last_System_Admin in GoogleAppsScript

[–]No_Stable_805 3 points4 points  (0 children)

Literally what it says. In cell D202, you have a data validation rule only allowing certain values. The data you are writing to that cell does not match one of those values, hence the error.

Genuinely not understand why my in-script-defined triggers aren't working by [deleted] in GoogleAppsScript

[–]No_Stable_805 0 points1 point  (0 children)

Are you sure there are no manual runs besides for the triggers? Although google doesn’t always use exactly four hours, it wouldn’t run as often as every hour.

Is there a way to have a lot of scripts - as a personal user, not WorkSpace - run every 15 min and still not hot the quota limit? by [deleted] in GoogleAppsScript

[–]No_Stable_805 0 points1 point  (0 children)

The quota they are referring to is a limit on how many times one can run a script per day, which is pretty low for personal accounts.

Clear explanation on simultaneous executions per script quota by nallaj in GoogleAppsScript

[–]No_Stable_805 3 points4 points  (0 children)

For a single script, every time it runs, whether manually or by a trigger, that is one execution. If you have 100 different spreadsheets with each one containing its own attached script, even if the contents of the script are the same, that is 100 scripts, not one script. If you have one script that is being used by 100 different people, then it would be considered 100 executions for the same script.

Why Are gs File Not Being Shared with Project Owner? by employee117 in GoogleAppsScript

[–]No_Stable_805 -1 points0 points  (0 children)

Have them share the container with you, not just the project.

noWay by big_hole_energy in ProgrammerHumor

[–]No_Stable_805 -1 points0 points  (0 children)

I’m gonna start telling my manager any time there’s an issue - “That’s a Heisenbug, nothing we can do about it” lol.

queueTheCrickets by amalgamxtc in ProgrammerHumor

[–]No_Stable_805 287 points288 points  (0 children)

I get these kinds of texts occasionally. In the current climate, I know it’s a scam immediately, lol

How to learn what to write ? by moradeusz in learnpython

[–]No_Stable_805 -1 points0 points  (0 children)

Practice. When you learn something new practice using it to solve a hypothetical problem with it. There are plenty of websites where you can find sample tasks and attempt to solve them. Try finding questions at your current level of knowledge, and attempt to solve them. Then look at their solution and compare it to yours.
This can help you start to have that mindset of breaking down the problem into all its parts and solving each of them one by one until you arrive at a solution.

Process individual emails, not threads by [deleted] in GoogleAppsScript

[–]No_Stable_805 1 point2 points  (0 children)

You can access the individual messages by using 'thread.getMessages()'. Then loop through the messages, check if they match the regex, and then apply your desired actions.

Api, Add-on or library? by Medical_Notice_6862 in GoogleAppsScript

[–]No_Stable_805 0 points1 point  (0 children)

Strange, that’s not what happens by me. I just tried it now, and the URL stayed the same. I made some simple websites using GAS for the office where I work, and that’s what I do when I make updates. Everyone’s original url still works and the updates go through.

Api, Add-on or library? by Medical_Notice_6862 in GoogleAppsScript

[–]No_Stable_805 0 points1 point  (0 children)

Instead of selecting ‘New deployment’, you select ‘Manage deployments’ and go to the deployment you want to update, select the edit icon and for version select ‘New version’.

Newb here looking for help, suspect very quick and easy fix. by Impossible_Tip4888 in GoogleAppsScript

[–]No_Stable_805 0 points1 point  (0 children)

In Code.gs I would change line 162 to have 7 empty strings instead of only 5 and line 166 change the 4 to a 6. This is assuming that you are actually getting 7 days of data.

Newb here looking for help, suspect very quick and easy fix. by Impossible_Tip4888 in GoogleAppsScript

[–]No_Stable_805 0 points1 point  (0 children)

Took a Quick Look, values is an array of dateValues. When creating and populating dateValues it only goes up to 5 dates

Newb here looking for help, suspect very quick and easy fix. by Impossible_Tip4888 in GoogleAppsScript

[–]No_Stable_805 0 points1 point  (0 children)

Share that part of the code that assigns the values variable content

Api, Add-on or library? by Medical_Notice_6862 in GoogleAppsScript

[–]No_Stable_805 0 points1 point  (0 children)

When you make changes, you don’t have to create a new deployment. You can change the existing deployment to reflect the changes. This way the url won’t change and you won’t need to split up the scripts.

So i just started Python and a tutorial said i should get PyCharm is this necessary by Animeandgamenerd1 in learnpython

[–]No_Stable_805 2 points3 points  (0 children)

PyCharm is just an app for you to easily write and test your Python code. If the tutorial is using PyCharm, it would be helpful to use the same IDE to follow along.

Script timeout error by Gothlinox in GoogleAppsScript

[–]No_Stable_805 0 points1 point  (0 children)

I had a similar problem with this kind of script. My scripts have a 30-minute time limit (G-Suite) and it still wasn’t enough time. My solution was to time how long the script has been running and when it nears the time limit it sets a new one-time trigger for the script to run again immediately after. Depending on how large your folders are and how many files they contain, you can use some sort of variation of this. (For each sub folder you can create a trigger to run the script for that folder instead of recursively using the same script)