Bridge sort sheet by two columns

Options
Zeb Loewenstein
Zeb Loewenstein ✭✭✭✭
edited 03/10/23 in Add Ons and Integrations

We're using an HTTP Call to sort a sheet based on the values within a column.

Is it possible to sort by TWO columns within the same query? If so, I'd be grateful to know how the parameter body should be updated to accommodate.

E.g. Sort by "Manager" then "Resource Name"

Form Parameter - Body = {"sortCriteria": [{"columnId": 3400991145518980, "direction": "ASCENDING"}]}


Tags:

Best Answer

  • Genevieve P.
    Genevieve P. Employee
    edited 03/10/23 Answer ✓
    Options

    Hi @Zeb Loewenstein

    Yes this should be possible! I haven't tested this directly in Bridge but I know you can do it using the Smartsheet API.

    Here's the documentation on row sorting, and here's the information about the SortSpecifier Object.

    This is what an example Body would look like:

    {
        "sortCriteria": 
        [
            {
                "columnId": 11111,
                "direction": "ASCENDING"
            },
            {
                "columnId": 22222,
                "direction": "ASCENDING"
            }
        ]
    }
    


    You'll want to list the column IDs in order of priority. Let me know if this works for you!

    Cheers,

    Genevieve

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now

Answers