Adding Predecessor That Includes Lag via API
I'm able to add predecessors to rows via API (PUT and URI https://api.smartsheet.com/2.0/sheets/{sheet ID}/rows), but am unable to add a lag value to the objectValue.
I referenced: Is there any way to add or update the Predecessors column value by C# or Rest Api? — Smartsheet Community to build this. Kudos to @Genevieve P. for your responses in that thread!
Body I am using:
{
"id": {row ID},
"cells": [
{
"columnId": {column ID},
"objectValue": {
"objectType": "PREDECESSOR_LIST",
"predecessors": [
{
"rowId": {predecessor row ID},
"type": "SS"
},
{
"rowId": {predecessor row ID},
"type": "FS"
}
]
}
}
]
}
]
This is working and adding the predecessors, but I cannot figure out how to add lag. I attempted to use a "lag" tag, but it was rejected as not recognized. Is there a way to accomplish this?
Answers
-
Have you tried something like...
"rowId": {predecessor row ID},
"type": "FS + 3d"
-
Hello @Paul Newcome
I tried without success. Returned that the value was not expected for "type". I found some old documentation that indicated I could use "Lag", but it didn't work either. I tried "lag" as well, and it didn't recognize either as a valid parameter.
-
This is what finally worked using the Update Rows call (PUT, sheets/{sheet id}/rows.
{
"id": "5830513915367300",
"cells":
[
{
"columnId": 7025938211491716,
"objectValue":
{
"objectType": "PREDECESSOR_LIST",
"predecessors":
[
{
"rowId": 201014381154180,
"type": "FS",
"lag":
{
"objectType": "DURATION",
"days": 1
}
},
{
"rowId": 4704614008524676,
"type": "SS"
}
]
}
}
]
}
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives