Welcome to the Smartsheet Forum Archives
The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.
Any way to change the "predecessor"'s values via the API?
I know that such functionality is not supported, but I was wondering if maybe there are work-around.
I am creating an script that bulk edits various sheets by starting from one sheet (useful if you want to synchronize multiple sheets) - https://github.com/EffEPi/smartsheet_bulk_edit
The problem that I am having is that everything sems working properly except the editing of column types:
- PREDECESSOR
- DURATION
- ABSTRACT_DATETIME
Any explanation why those fields cannot be edited ?
Comments
-
I would like to be able to edit the Predecessor via the API too.
Craig -
You can update these values using the objectValue object. We have examples of its usage in the docs here:
http://smartsheet-platform.github.io/api-docs/#objectvalue-object
for example, to update a predecessor on a row you would send a PUT to the update row endpoint, /sheets/{sheetId}/rows, with a body like this:
{
"id": "ROW_ID",
"cells": [
{
"columnId": COLUMN_ID,
"objectValue": {
"objectType" : "PREDECESSOR_LIST",
"predecessors": [
{
"rowId": ROW_ID,
"type": "FS"
}
]
}
}
]
}
If you have trouble with this feel free to reach out to us at api@smartsheet.com.
-
Sweet.
Craig
-
Where do you run the APIs? Is there a compiler built into Smartsheet, like google docs, or does it need to be run elsewhere. I'd love to dig into the API but I am unsure where to start.
-
Brett,
The API allows code to be written to integrate to Smartsheet.
It can be written in C#, Java (JSON), Python, cURL, and Node.js.
This can be stand-alone code or embedded into another piece of software (like a web page). The API Docs that Dave mentioned are the best place to start.
http://smartsheet-platform.github.io/api-docs/#overview
Craig
-
The only code I have written in the last 10 years was JavaScript within GoogleDocs. I am not sure where the code should 'stand alone' or embed. Programming isn't my primary role any more, but as a tools/project mgr with no one else here to assist me I can see where leveraging the API would be helpful.
What the documentation is missing for me is how to get started writing the node.js code. Which program is reccomended. How do I import the SDK etc. This probably sounds basic, but since most all of my programming experience predates the modern web, I am not sure where to start.
Once I am through that door, I am confident I can use the API to get to teh resources I need. -
Brett, if you no development knoledge it will be very hard to write robust code that will work. APIs are a tool and to be able to use you need to know how. Think it as a nail and a hammer. they are simple if you know what they are and how to use them, but give them to someone that never seen them, they will probably make a few mistakes, they will need to google how to use them, and probably ending up with the nail in their forehead ( https://www.youtube.com/watch?v=-4EDhdAHrOg )
-
Fabrizio - three years ago I used the google spreadsheets API to build a dynamic gantt chart based for a company that had all their data on google drive. I can handle the hammer and nail, Just need to know where to set up.
-
Thanks alot. I'll dig into this this week.
-
kool, then you can start here:
- choose what language you want to use
- NODE? https://www.google.com/#q=setup+node.js
- PHP? https://www.google.com/#q=setup+LAMP
- PYTHON? https://www.google.com/#q=setup+PYTHON
- C#? https://www.google.com/#q=install+C#- cURL? https://www.google.com/#q=install+Curl
- Javascript? well, notepad and any browser should do it
Once your environment is installed you can start develop with it. ( https://www.smartsheet.com/developers/sdks )
I use PHP and wrote my own library ( https://github.com/EffEPi/smartsheet_bulk_edit ) that will allow me to do bulk edits to many sheets, in there you can find a class that will allow you to send and receive requests to SmartSheet as well as generate queries to use to import the sheets into your own RDBs (mine is MySQL) https://github.com/EffEPi/smartsheet_bulk_edit/blob/master/classes/smartsheet.php
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 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