Sorting & Grouping

Control the order of your line items in generated PDFs. TypeFlow uses your Airtable views to preserve sorting and filtering.


Overview

When you have line items in your documents (invoices, reports, etc.), you often need them in a specific order:

  • Products sorted by name or SKU
  • Line items sorted by date
  • Tasks grouped by status

TypeFlow lets you use Airtable views to control this sorting - whatever order you see in your view is what appears in your PDF.


Sort Data in Airtable

Step 1: Go to Your Linked Table

Navigate to the Airtable table that contains your line items (the table your main record links to).

Step 2: Create or Select a View

Click the View dropdown and either:

  • Select an existing view
  • Create a new Grid view

Step 3: Add Sorting

  1. Click the Sort icon (two arrows)
  2. Select the field to sort by
  3. Choose Ascending or Descending
  4. Click Add sort for multiple sort levels

Step 4: Save the View

Give your view a descriptive name like "By Date (Newest First)" or "By Product Name A-Z".

Example Sort Configurations

Use CaseSort ByOrder
Invoice line itemsDateNewest first
Product catalogProduct NameA-Z
Task listPriority, then Due DateHigh to Low
Time entriesDate, then Start TimeChronological

Apply Sorting in TypeFlow

Step 1: Set Up Line Items

Make sure you've already configured line items in your template using {{loop_0}} or {{nested_0}}.

Step 2: Select Your View

In TypeFlow's line items configuration:

  1. Find the linked record section
  2. Look for the View dropdown
  3. Select the Airtable view you created

Step 3: Generate

When you generate your PDF, TypeFlow will use the sorting from your selected view.

Tip: Create multiple views for different document types. Use "Invoice Order" view for invoices and "Report Order" view for reports.


FAQ

Does TypeFlow preserve my Airtable sorting?

Yes. TypeFlow uses your Airtable views to maintain sorting and filtering when generating PDFs.

Can I sort by multiple fields?

Yes. Create a view in Airtable with multiple sort conditions, then select that view in TypeFlow.

How do I filter which line items appear?

Create a filtered view in Airtable that shows only the records you want, then select that view in TypeFlow.

What if I don't select a view?

TypeFlow will use the default record order from Airtable, which may not be what you expect. Always select a specific view for consistent results.



Need More Help?

Was this page helpful?