Skip to main content

Create a Stitch

Stitch Query Types

SQL Stitch.

SQL is by far the most common type of Stitch used in Sheetloom. It comprises an SQL query, a predefined database connection, and optional parameters.

SuiteQL Stitch

For clients with a NetSuite installation. SuiteQL code is used to query NetSuite via a preconfigured connection established during Sheetloom´s onboarding process.


Create A Stitch

All Stitches are configured in the same way.

Navigate to the Patterns page and click Create Stitch.

create stitch button


The Create Stitch panel displays

configure stitch


Stitch Elements

FieldDescription
Pattern NameThe name of the Pattern to save the Stitch to. Select from a dropdown list of all patterns
Stitch NameThe name given to the Stitch
TypeThe query type: SQL, SuiteQL or Form
ConnectionThe connection to use when running this query. Choose the required connection from a prepopulated dropdown list
QueryThe query to be to executed.
Query BuilderGraphical interface to enable non-technical users to build a simple SQL query from CSV data sources
DescriptionGive a meaningful description to inform users what data the Stitch query returns
ParametersUse the +/- buttons to attach an existing parameter to the Stitch
Copy ReferenceAllows the pattern.stitch concatenation name used in mapping to be copied to the Excel named range or worksheet tab

Input the Stitch details. Click Previewto review the data. The first ten rows display.


preview stitch

Click Close then Addto add to save the Stitch to the Pattern.

It can now be mapped to the Excel template ready for Weaving.


Adding Parameters to a Stitch.

To enable dynamic filtering at runtime the query can be parameterized using “?” in the WHERE clause. The column name used for the parameter must match an existing parameter separately created in Sheetloom and which is assigned from the Parametersdropdown box. See how to create a parameter here.

In Create or Edit Stitch, add the required parameter into the WHERE clause of the SQL Query:

WHERE required parameter =?

Click on the + sign to open up a list of Sheetloom parameters and add the corresponding one for the query.


stitch add parameter


Multiple parameters can be added by adjusting the query and adding in further parameters.

Click `Preview` to review the query. A parameter prompt will be displayed. Enter the test value and click `submit`. The first ten rows of the filtered query are displayed.

input parameter value


Click `Close`to shut down the preview then `Save`

In the example a parameter called Office was created in Sheetloom and added during Stitch configuration to match the parameter in the SQL.

At runtime the User is presented with the dialogue box as shown above in the Preview, and prompted to enter a filter value.


Edit a Stitch

Navigate to Patterns and click the Pattern box then the Stitch. From the Stitches page select the ellipsis, or click on the Stitch name and edit stitchbutton that displays.

The Edit Stitch panel box will open. Make necessary changes and select Submit to save the Stitch. Edits can be Previewed before submitting.

caution

Changing a Stitch name will break any mapping between it and any Excel template using the previous name.


Copy a Stitch

Navigate to Patterns and click the Pattern box then the Stitch. From the Stitches page select the ellipsis, or click on the Stitch name and Edit Stitch button that displays. The Edit Stitch panel box will open. Click Copy. The Stitch is copied to the same Pattern, appended with “_copy”.


Delete a Stitch

Navigate to Stitches. Check the box beside the Stitch name to be deleted and click Delete Stitch. A Stitch can also be deleted by selecting the ellipsis button.