Update all rows with dependency defined (Duration and Predecessors)

Joy Biswas
Joy Biswas ✭✭
edited 03/15/20 in API & Developers

In Smartsheets I have these columns Duration, Predecessors, Start and End Date, When I change my base Start date all my rows for EndDate and StartDate are then populated. I am trying to achieve the same functionality by api but when I update that base cell with start date value it gets updated but not the other rows for the same column. Do I have to manually calculate all dates based on predecessor and duration and update all rows (if using via api)?

const sheetId = <some_sheet_id>;
const rows = [{
  "id": <row_id>, "cells": [{
    "columnId": <column_id>,
    // option 1 with value (either one)
    "value": new Date("2020-03-15"),
    // option 2 with objectvalue (either one)
    "objectValue": {"objectType": "ABSTRACT_DATETIME", "value": new Date("2020-03-15")},
  }]
}];
const options = { sheetId, body: rows };
await smartClient.sheets.updateRow(options);
// response is success


Answers