-5

I'm in the very early stages of building out this script, so any guidance is appreciated.

I have a Sheets document that inventories devices such as laptops. Each entry has a variety of columns detailing the device's serial, location, etc.

I would like to add a script to the master sheet that generates a new entry on another sheet once a certain column value is enabled. Specifically, if an entry is marked as "decommissioned" on the master sheet, I would like for the entry's relevant data to auto-populate in a new row on the "decommissioned" sheet.

I have not tried running any scripts for this yet, mainly because I'm not sure where to start.

My initial thought is that an IF(){} function where the "decommissioned" status is the variable in question would allow me to set the script so that if an entry is marked "decommissioned" on the master sheet, the script triggers.

Once I know the script will trigger based on the column value, I think I can build out the rest of the script so that the relevant info is created in a new entry on the desired sheet.

If this question is too vague, let me know and I will attempt more so that focused guidance can be provided.

New contributor
Samuel Greenlees is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
3
  • 2
    Welcome to Stack Overflow. This question is not a good fit for this site because it's too broad. Questions on this site should be about specific problems unique to programming. Regarding the scope of this site, please check out the tour. Regarding the script, you might have to start by reading developers.google.com/apps-script/guides/sheets.
    – Wicket
    Commented 2 days ago
  • 1
    You may want to try a Group by view instead of moving rows from tab to tab. For sample code to move rows, see my moveRowsFromSpreadsheetToSpreadsheet_ script. Commented 2 days ago
  • I would like for the entry's relevant data to auto-populate in a new row on the "decommissioned" sheet. Please explain why you want a "decommissioned" sheet. One option is to retain the existing master sheet (and the row-by-row "decommissioned" checkbox), but include a dropdown at the top of the sheet for whether to display ALL items, 'decommissioned" items only, or "in commission" items only.
    – Tedinoz
    Commented yesterday

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.