Is there a way to remove Predecessors from a row via the API in c#?
Using the API I am able to add and update the predecessors column. However, I am not able to remove it via API. I tried by passing a rowId as 0, but that returns an invalid, which populates the column with #REF for that that.
Is there a way to remove or delete Predecessors using the api?
Below is the code I tried to pass rowId as 0. What is the workaround for this?
{ "cells": [ { "columnId": xxxxxxxxxx, "objectValue":{ "objectType": "PREDECESSOR_LIST", "predecessors": [ { "rowId": 0, "type":"FS" } ] } } ] }
Thank you
Answers
-
Have you tried passing a blank for the rowId and the type? Or maybe using the current rowId that your pulling the info from (so same rowID) and passing a blank type?
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Have you looked into how to clear a cell in general instead of trying to remove a predecessor?
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Hi Paul, I believe rowId needs to be a number, but I'm ok with trying, I'll also try blank type, since I haven't try that yet. Thanks.
-
Hi Paul, I tried all scenarios you suggested but nothing worked.
Tested blank rowId, it didn't work, since it needs to be numeric. Tested using the current rowId, this didn't work, it returns a circular dependency which resulted in the same #REF. Tested blank type, this didn't work, it failed with the following error "updating Type is not permitted." something like that.
If you think of something else let me know.
Thanks
-
I haven't looked into clearing a cell using the API, but I feel like it should be possible. Maybe clearing the cell completely instead of trying to manipulate the predecessor data might work?
At the bottom of this table it indicates that the Predecessor cell value is a string (comma delimited), so I feel like being able to clear it out should be possible.
Trying to provide a hyperlink to the table. Hopefully THIS works...
You can also use a Clear Cell automation built into the sheet to remove predecessors if there is a certain trigger within the sheet that can be used. Quite possibly the same trigger you are wanting to use for the API. And that would probably be easier to set up.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Thanks Paul, it is working. I think it's the same idea you had here. I passed a new empty cell with nothing but the Predecessor column Id and that works nicely.
Thank you very much.
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives