Snippets
Snippets are reusable pieces of SuiteQL you can save and insert into the editor. Use them for joins, filters, or other fragments you write often, without saving an entire query.
Snippets are stored in NetSuite, so they are available in any browser and to other NimbusQL users.
Opening Snippets
Section titled “Opening Snippets”- Open the Write Query screen
- Click Snippets
My Snippets vs All Snippets
Section titled “My Snippets vs All Snippets”At the top of the Snippets window, choose what to show:
- My Snippets — snippets you created. This is the default view.
- All Snippets — snippets created by anyone in your account.
If My Snippets is empty, create a snippet or switch to All Snippets.
What Each Row Shows
Section titled “What Each Row Shows”Each row includes:
- Name — the snippet name
- Category — an optional label, such as JOIN, CTE, or Filter
- Owner — who created the snippet
- Modified — when it was last saved
- Preview — a short preview of the snippet code
Use search to find a snippet, and paging when there are more than 10 entries.
Creating a Snippet
Section titled “Creating a Snippet”- Click New Snippet
- Enter a Snippet Name and the Code to reuse
- Optionally enter a Category and Notes
- Click Save Snippet
Name and code are required. You cannot save a second snippet with the same name as one you already created.
Saving closes the Snippets window. Open Snippets again to see the new entry.
Saving highlighted text
Section titled “Saving highlighted text”To turn part of the editor into a snippet:
- Highlight the SuiteQL you want to keep
- Click Create Snippet on the selection toolbar, or open Snippets and click Save Selection
- Enter a name, then click Save Snippet
The Code field is filled with the highlighted text. You can edit it before saving.
Inserting a Snippet
Section titled “Inserting a Snippet”- Click a row to select it
- Click Insert
The Snippets window closes and the snippet code is added at the cursor. If you have text selected in the editor, that selection is replaced. The rest of the editor is left unchanged.
If no row is selected, choose a snippet first.
Editing or Deleting a Snippet
Section titled “Editing or Deleting a Snippet”You can edit or delete snippets you created. Administrators can also manage snippets created by others.
To edit:
- Click Edit on the row
- Change the name, category, notes, or code
- Click Save Snippet
To delete:
- Click Delete on the row
- Confirm when prompted
Click Back to return to the list without saving.
- Snippets are stored in NetSuite. They persist across devices and browsers.
- Other users can insert your snippets from All Snippets. They cannot edit or delete snippets they did not create (unless they are an administrator).
- Snippets are fragments you insert. To save and reload a complete query, see Save and Load Queries.