Workaround (or Roadmap): Clear merge jobs status columns at job start

615 views
Skip to first unread message

Michael H

unread,
May 9, 2022, 3:47:23 AM5/9/22
to NV Autocrat Add-on
Looking at the FAQ's, i've spotted this entry:

- - - - - - - - - -
How do I re-merge a row of data that has already been merged?
AutoCrat will not merge any rows that have any text in it at all in them.  To get autoCrat to re-merge a row, simply delete the status message in that merge jobs status column.
- - - - - - - - - -

However, this can be a little painful when you're dealing with a first time user who might need to run the same job multiple times; or you're needing to test the job a few times after modifications to ensure it works.

The other scenario is when you have to run the same job repeatedly, and of course you get either slowed down by needing to clear the data, or starting it again because you forgot to clear the data.

Does anyone know of (or have) a way of:
1) Preventing the job populating the status columns in the first place,
2) Clearing the columns after a job is run, or
3) A quick script that you can say 'Hey, see these columns - remove all the data from them please'

And as for the roadmap, does anyone have any idea on if this is a function that could be added to it, and how one might go about proposing it?

Thanks in advance.

Michael H

unread,
May 9, 2022, 8:36:03 AM5/9/22
to NV Autocrat Add-on
Managed to resolve it myself, using Apps Script.

Created a code block that, backed up by a trigger to run onOpen, will clear the contents of a defined range of cells in the defined sheet.

This comes with obvious cautions - such as if you add or delete columns in your spreadsheet. If you don't update the script to account for the changes,, you may automatically remove data from unintended columns.

So if using, I strongly recommend your spreadsheet has good documentation, permissions, and clear user communication; to ensure you don't suffer undue consequences or spend forever rolling back and recreating previous versions.

Would be good if the plugin incorporated this or a similar method, with the ability to apply it to a specific job as a clean-up step pre or post execution, so future runs of that specific job were easier.

/**
* Clear Autocrat cells
*
* Function to clear the contents of Autocrat merge fields onOpen of spreadsheet,
* to prevent rows since updated from being left out of a merge
*
* Resources used:
**/

function onOpen(e) {
var range = SpreadsheetApp
.getActive()
.getSheetByName("Sheet Name")
.getRange("A2:E");
range.clear();
}

Joseph Schmidt

unread,
May 9, 2022, 9:03:29 AM5/9/22
to nv-autocr...@googlegroups.com
You could have used the preview option and the output would have been created.  The preview option is next to the edit and looks like an eye.  Preview doesn't add to the status column.



--
You received this message because you are subscribed to the Google Groups "NV Autocrat Add-on" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nv-autocrat-add...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nv-autocrat-add-on/4330a0bd-3f39-497f-ba65-3035f0b247a5n%40googlegroups.com.

Dimu Designs

unread,
May 10, 2022, 2:38:27 PM5/10/22
to NV Autocrat Add-on
Hello Joe,
Do you still play a role in maintaining New Vision Schools' many Add-ons? Aside from bug fixes I rarely see much activity these days related to Google Workspace (formerly GSuite) Add-ons. 

Joseph Schmidt

unread,
May 10, 2022, 3:51:36 PM5/10/22
to nv-autocr...@googlegroups.com
I have never touched any of the scripts.  As a hobby, I try and help as much as I can to support the education sector.  I support others as I have time.

I wouldn't expect NewVisions to make changes or add any new Add-ons unless they found a need within their charity.

Thiên Phú

unread,
May 10, 2022, 4:41:39 PM5/10/22
to nv-autocr...@googlegroups.com
If you stop receiving emails, you will return it to me as it was

Vào 2:51, Th 4, 11 thg 5, 2022 Joseph Schmidt <glua...@gmail.com> đã viết:

Thiên Phú

unread,
May 10, 2022, 4:51:53 PM5/10/22
to nv-autocr...@googlegroups.com
Return what you say as long as you return to the way it was, and everything else is not mine

Vào 3:41, Th 4, 11 thg 5, 2022 Thiên Phú <tltpthi...@gmail.com> đã viết:

Thiên Phú

unread,
May 10, 2022, 5:40:39 PM5/10/22
to nv-autocr...@googlegroups.com
The documents in the sheet or all downloaded by me have not been modified or altered in any way. I don't know if it's safe to use storage or not, I'll remove the document. Please review and install it and see if there are any mistakes or changes I am responsible for 

Vào 20:03, Th 2, 9 thg 5, 2022 Joseph Schmidt <glua...@gmail.com> đã viết:
Reply all
Reply to author
Forward
0 new messages