How to select a row's position using Azure Logic Apps.

I need to be able to add a row wherever I want by connecting a logic app to the built in connector to Smart Sheets. I've got the package formatted correctly to actually insert the row into the correct sheet with the correct information, but it adds it to a random row. How can I dictate which row it gets inserted into using my current package.

I have tried using parentID and toTop as parameters in the body.

The package I'm sending now looks like this:

{

    "method": "post",

    "path": "/sheets/*sheetID*/rows",

    "host": {

        "connection": {

            "name": *Authentication Info*

        }

    },

    "body": {

        "Tasks": "Column Data",

        "Work Item Title": "Column Data"

    }

}

Tags:

Best Answer

  • Julio S.
    Julio S. Moderator
    Answer ✓

    Hi @Shadrock,

    As you point, the way to control where in your sheet new rows are inserted through the API, is by using location-specifier attributes. With these you should be able to determine whether the row is to be placed at the top or the bottom of the sheet or establish hierarchical relationships among new and existing rows. Note that these attributes should come first in your Request Body Schema as per the POST row method

    If using this type of attributes doesn't seem to work (rows are inserted randomly within the sheet even if the specific attributes have been defined as per the schema), I would recommend opening a ticket with our Support team via this form and include an example of your API call where the request body that includes this attribute in the Post Row method is visible as well as the resulting response in your sheet for that particular API call.

    I hope this can offer some guidance.

    Cheers!

    Julio

Answers

  • Julio S.
    Julio S. Moderator
    Answer ✓

    Hi @Shadrock,

    As you point, the way to control where in your sheet new rows are inserted through the API, is by using location-specifier attributes. With these you should be able to determine whether the row is to be placed at the top or the bottom of the sheet or establish hierarchical relationships among new and existing rows. Note that these attributes should come first in your Request Body Schema as per the POST row method

    If using this type of attributes doesn't seem to work (rows are inserted randomly within the sheet even if the specific attributes have been defined as per the schema), I would recommend opening a ticket with our Support team via this form and include an example of your API call where the request body that includes this attribute in the Post Row method is visible as well as the resulting response in your sheet for that particular API call.

    I hope this can offer some guidance.

    Cheers!

    Julio