My question is in the title. I've been trying to play with that but it does not seem to have any impact on duration behaviour, whether it is in the duration column or as a lag for a predecessor.
Elapsed duration simply ignores non-working days. If the start day is Monday and you just have 7d for your duration, it will display the finish date as next Tuesday (7 working days). If your duration is e7d, then it will include the non-working days of Saturday and Sunday, and your finish date would be displayed as Sunday. (Assuming you have it set as Mon - Fri as working days)
CERTIFIED SMARTSHEET PLATINUM PARTNER
Efficiency Live: The Ultimate PM Toolkit Workshop
Paul's comment above is correct for the behavior of elapsed time in your sheets. As for what you are seeing in the Python SDK, that is just for the purposes of JSON serialization. When you have elapsed time values in durations on your sheet you will see an elapsed attribute on the Duration object and that method sets the boolean value as needed when that attribute is present. There isn't any ability to set whether or not a duration is elapsed time via that attribute. instead you would enter in a duration value like "e3d" to make the duration behave as elapsed time. Note, you only see this in the Duration object if you include objectValue in your GET Sheet request. An example of including objectValue would look like this:
sheet = smar_client.Sheets.get_sheet(<SHEET_ID>, ['objectValue'])
Ooh I see, thank you !
Happy to help!
Does it mean I can't change that from the API when using the objectValue field ? It's far more consistent and tractable to use the objectValue because it refers the predecessors by row id and not by row number.
But the objectValue field requires me to put a duration object for the lag I want. Sadly it does not seem like I can pass a string value with the 'e' at the beginning to force the elapsed time mode. I only have access to the field elapsed_time of the duration object. But as you said, it doesn't work to update the rows from the API.
Any way I can do this ?
You can update a row to give elapsed time in the Duration column. Here is an adjusted example of the update_rows method updating a Duration column to an elapsed time using object_value:
# Assuming you created a client with the SDK named smar_client
# Build object value
new_object_value = smar_client.models.Duration()
new_object_value.days = 3
new_object_value.elapsed = True
# Build new cell value
new_cell = smar_client.models.Cell()
new_cell.object_value = new_object_value
# Build the row to update
new_row = smar_client.models.Row()
new_row.id = <ROW_ID>
# Update rows
updated_row = smar_client.Sheets.update_rows(
I have literally no idea what I was previously doing wrong then. Now it works >< Thank you !
Glad to hear it's working!
Hello everyone, I'm struggling with a method in Smartsheet API to add several rows to a sheet with Date Columns included. The point is compared with "update_rows" where it's working perfectly, when I try to use add_rows, the date format stays in ISO format and looks like this: Which is not the case with update_row where…
Does anyone have any experience with connecting between Smartsheet and Unanet?
We are using the smartsheet-python-sdk to insert rows into SmartSheets. For almost two years we have had this script running with no issue, but in the last week, SmartSheets has started to trim the leading zeros on fields that are all numeric. Nothing has changed in our sheet or in our script. Are others having this issue?…
©2024. All Rights Reserved Smartsheet Inc.