Any way to get cell history other than one cell at a time?
Working to clean up after Control Center's built-in archiving functionality made a mess of one of our archive sheets (but that's a story for another time).
Basically, the archiving function duplicated some rows as it moved them to the archive sheet, anywhere from 1 to 5 times each. I need to go through and clean up the duplicated rows and am doing so using Python and the Smartsheet API. The kicker is that there is one 'right' row from any given set of duplicates and the rest are 'wrong' rows - the right row will be the original row that was actually moved from our intake sheet (and will have the corresponding cell history), whereas all the wrong rows don't have any cell history. That's the only way I've found so far to determine which one to keep or delete.
The issue I am running into is that it's trivial to get a list of distinct and duplicate Project IDs (a unique value we use) and then extrapolate that into a list of row IDs that contain those duplicate project IDs. As mentioned, the only way I can tell which row to keep is the one that has more than one entry in it's cell history for a certain cell - I have written it out and the code to do it does work fine, however it's having to use an API call for every single row in my list of duplicate rows... far from optimal.
Is that really the only way to get at cell history? From reading the docs I think this might be what I'm stuck with, but figured I'd ask around and see if I'm overlooking anything obvious.
Best Answer
-
Yep, every cell individually. That endpoint doesn't support batched row Ids as far as I can tell.
The only other way is if you have Event Viewer as part of an Advanced Platinum package or have paid for it ala carte. That provides all events from time periods across your account, which you could then parse through to find the applicable ones. https://smartsheet.redoc.ly/tag/events
Answers
-
For what it's worth, I did take a stab at just feeding the get_cell_history method a list of row IDs... it didn't like that.
-
Yep, every cell individually. That endpoint doesn't support batched row Ids as far as I can tell.
The only other way is if you have Event Viewer as part of an Advanced Platinum package or have paid for it ala carte. That provides all events from time periods across your account, which you could then parse through to find the applicable ones. https://smartsheet.redoc.ly/tag/events
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives