"Row Moved" not in Cell History when called by the API?
"When I call "List Cell History" with the API the "Row was moved from another sheet" does not show up. Am I doing something wrong? Why can't I get this cell history?
Best Answer
-
Hi @Samuel Mueller,
Thanks for your patience waiting for an answer about this. In further internal review we've received confirmation that, at the moment, no "row was moved" action is expected when using the API to get the Cell History. Please let our Product team know about your feedback by filling in this form, here. Thank you!
Julio
Answers
-
My apologies for the delay; I've been able to replicate what you're describing (this action is not in the API response for the Cell History, even when it appears in the UI). I'm checking with our teams to see if this is currently expected behaviour or not and I'll follow up once I have more information.
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Hi @Samuel Mueller,
Thanks for your patience waiting for an answer about this. In further internal review we've received confirmation that, at the moment, no "row was moved" action is expected when using the API to get the Cell History. Please let our Product team know about your feedback by filling in this form, here. Thank you!
Julio
-
Thank @Julio S. and @Genevieve P. for your follow up answers, I appreciate the help.
-
@Samuel Mueller I am trying to access the Cell History in Bridge. How did you go about doing this?
Thanks,
Dustin
-
Hey @dsmitts.jay
You can use an HTTP module to call the Smartsheet API and get the Cell History.
- Here's the information about the HTTP Call Utility Function
- Here's the information in the Smartsheet API documentation about getting Cell History
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
@Genevieve P. Thanks for answering this for me 😊
@dsmitts.jay If you need an example beyond the information Genevieve sent along, let me know and I can share one with you.
-
@Samuel Mueller Yes that would be great.
-
@dsmitts.jay So there are 3 things you need in order to get the cell history.
- Sheet ID
- Row ID of the cell
- Column ID of the cell
You can get these by doing a get sheet method in bridge, and you find the sheet ID in the sheet- file -> Properties
I'm not sure how much you know about Bridge, but here is an example of how to get dynamic fields out of the workflow.
clicking copy will add something like {{states.startstate.smartsheet.get_sheet.sheet.columns.1.id}} to your clipboard that you can plug into your HTTP call url. Or once you get the IDs you want, you can either hardcode them, or use the dynamic data reference. Below are both examples of the URL to use for the HTTP Call (hardcode, or dynamic):
- Dynamic: https://api.smartsheet.com/2.0/sheets/{{states.startstate.smartsheet.get_sheet.sheet.id}}/rows/{{states.startstate.smartsheet.get_sheet.sheet.rows.0.id}}/columns/{{states.startstate.smartsheet.get_sheet.sheet.columns.1.id}}/history?include=columnType
- Hardcode: https://api.smartsheet.com/2.0/sheets/46416037844228/rows/55620051428356/columns/29125725133060/history?include=columnType
In the simplest case you can have a workflow that's similar to this. You can ignore the retrieve data you wouldn't necessarily need that
Get Sheet allows you to retrieve your column and row ids
Then the HTTP call looks like this
the URL is one of the urls from my bullet points above. You would replace the Authorization Value with your API Token. and this is what the result would be:
Now depending on what you are actually trying to achieve, you will likely need a more complicated workflow and the use of Child Workflows or JavaScript to loop through the data.
-
I am somewhat familiar with Bridge and have been using it for things like populating dropdown options.
I am trying to retrieve the cell history for only rows that have changed. That sounds like a challenge seeing that I need the RowID to do the HTTP call in the first place. Unless there is a workflow I could build to pull only changed rows first?
Dustin
-
@dsmitts.jay You would need to use a trigger. However it's harder to know which columns were changed in a dynamic sense. So you would probably need to look at specific columns. Here is an example of a trigger.
Then your trigger will look something like this, and for rowid you can use that dynamic field so everytime a row is changed, it will return that row, and column you choose in your url. The Get Data Reference will return something like this: {{runtime.event.id}} and your URL in your HTTP call will be: https://api.smartsheet.com/2.0/sheets/{{states.startstate.smartsheet.get_sheet.sheet.id}}/rows/{{runtime.event.id}}/columns/{{states.startstate.smartsheet.get_sheet.sheet.columns.1.id}}/history?include=columnType
Then every time a row is changed, you will get the changes in that updated row, and the column you designated.
-
@Samuel Mueller ok thanks, I'll try and make sense if this, and see what I can make happen.
-
@Samuel Mueller can you further explain this "and for rowid you can use that dynamic field so everytime a row is changed, it will return that row, and column you choose in your url."
Thanks,
Dustin
-
@dsmitts.jay in the trigger section of my last screenshot, you see where it says ID under event, the "Data Reference" value from that id is {{runtime.event.id}}. if you place that text into the HTTP Call URL, it will be the row id that was changed in your sheet which caused the "trigger". It would return whatever row id that was changed and triggered the workflow.
You should set up a trigger and a simple get sheet and HTTP call to get an idea of how it functions, then build on that.
and if you have more questions I'm happy to help
-
@Samuel Mueller Will do, thanks for your help!
-
@Samuel Mueller So I set this up, but the HTTP Call is not giving me an output. Here is my URL: https://api.smartsheet.com/2.0/sheets/{{states.startstate.smartsheet.get_sheet.sheet.id}}/rows/{{runtime.event.rowId}}/columns/{{states.startstate.smartsheet.get_sheet.sheet.columns.12.id}}/history?include=columnType
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 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