First time posting here, so I apologize for any "grievances" and appreciate your patience. I'm working on a process that creates new sheet, and then parses an array of row Objects to be added to the new sheet.
https://smartsheet.redoc.ly/#operation/rows-addToSheet
The area I'm struggling with is including a property to indent the row being added. The indent property is indicated in the specify row location resource in the documentation.
https://smartsheet.redoc.ly/#section/Specify-Row-Location
Here is what i thought my row object should look like:
const myRowObj = [
{
toBottom: true,
cells: [
{
columnId: 3811134080870276,
value: 'no indent',
},
{
columnId: 8314733708240772,
value: "this line has no indent"
}
]
},
{
toBottom: true,
indent: 1,
cells: [
{
columnId: 3811134080870276,
value: 'indent sent to 1'
},
{
columnId: 8314733708240772,
value: "this line has an indent"
}
]
}
]
... however when using this row Object, I get an error back indicating that indent should be used by itself in a request.
{
statusCode: 400,
errorCode: 1062,
message: "Invalid row location: Use 'indent' by itself. You cannot use other location specifiers in the same request.",
refId: '9abmoi4dizfj',
detail: { index: 0 }
}
... when using the above code, and leaving out the indent
property, the rows are successfully processed, but no indentation takes place obviously. When removing the toBottom
properties from each row and using indent
in the second row instead, i get a new error:
{
statusCode: 400,
errorCode: 1123,
message: 'Specifying multiple row locations is not yet supported. Each row must use the same row location attribute and value (toBottom, toTop, parentId, siblingId,
above)',
refId: 'wbpkbx4qw7oz',
detail: { index: 1 }
}
This, of course, contradicts the original instruction for the first error. Including the indent
property on both rows, returns the first error. So, after spending around 4 hours trying to fidget with this much needed feature, I wanted to ask if anyone else has had success using the indent
property when adding rows to a sheet. I'm hoping someone could share a sample of how the row object with an indent is structured, since the documentation lacks a working sample.
Thanks in advance for your help,
Don V.