我只是在做一个简单的 add_rows 请求,需要将 overrideValidation 设置为 True,这样插入就不会因为 Picklist 列上的拼写错误而失败。
row.to_top = True
row.cells.append({
#date of service
"columnId": column_id,
"displayValue": "not a doc",
'strict': False
})
row.cells.append({
#Summary Finished
"columnId": column_id2,
"value": True
})
response = smartsheet_client.Sheets.add_rows(
sheet_id, # sheet_id
[row],
)
响应:{ status: 400 Bad Request content: { { "errorCode": 5536, "message": "The value \"not a doc\" could not be saved in column \"Prescribing MD\". 此列仅限于仅 PICKLIST 值。", "refId": "195gawcb3hbup" } } {"result": {"code": 5536, "errorCode": 5536, "message": "The value \"not a doc\" could not be保存在 \"Prescribing MD\" 列中。此列仅限于 PICKLIST 值。", "name": "ApiError", "recommendation": "不解决问题就不要重试。", "refId": "195gawcb3hbup ", "shouldRetry": false, "statusCode": 400}}