Sign in to join the conversation:
Hello,
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.
Thank you
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)
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.column_id =<COLUMN_ID>
new_cell.object_value = new_object_value
# Build the row to update
new_row = smar_client.models.Row()
new_row.id = <ROW_ID>
new_row.cells.append(new_cell)
# Update rows
updated_row = smar_client.Sheets.update_rows(
<SHEET_ID>,
[new_row])
I have literally no idea what I was previously doing wrong then. Now it works >< Thank you !
Glad to hear it's working!
Some of the APIs inexplicably don't seem to be working. For instance, I can make a request to the Get sheet endpoint fine, but when I try to List columns with the exact same variables I get a 404 Not Found response (see attached screenshots). Have encountered this with several other endpoints (for instance, Attach file or…
I have a report that beautifully aggregates data from 70+ sheets. I need one column from that report to populate a helper sheet that I have: Source Sheets > Report > Helper Sheet As the report grows with data, I want the helper sheet to grow with it without manual intervention. Ergo, the API question. Here's what I know…
We're looking to create a Gantt chart by inserting the data and creating the chart via the API (actually via the Java SDK, but either will do). Inserting the data is fine, but cannot seem to get the setDependenciesEnabled (which believe need for the Gantt ) or setGanttEnabled() to work… We think part of this is the order…