0

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
joyBlanks
  • 6,419
  • 1
  • 22
  • 47
  • I ran a simple test similar to what you described where all of the sheet recalculation occurred on update. When you look at the sheet through the webapp has it been updated? Can you post pre and post updates for the `GET /sheeds/{id}` response? (sanitized so it doesn't contain any sensitive info) – timwells Mar 18 '20 at 20:05
  • Problem was few rows had blank duration and predecessor (parent rows I call them can be folded). I added 1Jan1970 to my first task StartDate and saved it as a template. Next when I updated that date (initial task row's startdate) all my dates were populated hacky way but works for me. – joyBlanks Mar 19 '20 at 18:22

0 Answers0