Is it possible to add child rows to multiple parent rows with a single API call?
I am attempting automate adding standard sub/child tasks to many parent tasks at the same time.
Following the API documentation Specify-Row-Location I am using the parentID + toBottom location attributes for every child row. I am consistently getting errorCode 1123 when the program moves from the first parent row to the next parent row (parentID value changes).
When reviewing the documentation, my assumption was that as long as the location attributes used in the new row call were the same, the value of those attributes (parentID value) could be different.
Am I misunderstanding something in the documentation? Is it possible to add child rows to many parent rows in a single API call?
Here is the snippet of code that is building to new rows:
for pid, parent_id in added_row_id.items():
for subtask_name, subtask_info in sub_task_bl.items():
duration_val = subtask_info['duration']
# Create a new Row() for the subtask
subtask_row = smartsheet.models.Row()
subtask_row.parent_id = parent_id
subtask_row.to_bottom = True
subtask_row.cells.append({
'column_id': pjt_sap_col_id[PjtSAPCols.TASK.value],
'value': subtask_name,
'strict': False
})
subtask_row.cells.append({
'column_id': pjt_sap_col_id[PjtSAPCols.DURATION.value],
'value': duration_val,
'strict': False
})
child_rows_to_add.append(subtask_row)
Best Answer
-
They all need to be exactly the same
Answers
-
They all need to be exactly the same
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.5K Get Help
- 447 Global Discussions
- 144 Industry Talk
- 480 Announcements
- 5.1K Ideas & Feature Requests
- 85 Brandfolder
- 152 Just for fun
- 72 Community Job Board
- 492 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 304 Events
- 37 Webinars
- 7.3K Forum Archives