Anyone have success with startingNumber attribute for POST or PUT autoNumberFormat object requests?
I am trying to modify an a column to an AUTO_NUMBER systemColumnType. The API does NOT return an error, but rather the 'startingNumber' attribute does not actually have an effect on the sheet. I have tried both via the python sdk and also via CUrl command, I'm stumped. Anyone have any luck with this before?
PYTHON
#Column Update
column_spec = smart.models.Column({
'type':'TEXT_NUMBER',
'systemColumnType': 'AUTO_NUMBER',
'autoNumberFormat': {'startingNumber':50, 'fill':'000000'}
})
# Update column
response = smart.Sheets.update_column(
{SHEET-ID}, # sheet_id
{COLUMN-ID}, # column_id
column_spec)
CURL COMMAND
curl https://api.smartsheet.com/2.0/sheets/{SHEET-ID}/columns/{COLUMN-ID} ^
-H "Authorization: {ACCESS TOKEN}" ^
-H "Content-Type: application/json" ^
-X PUT ^
-d "{\"index\":\"0\",\"title\":\"ROW-ID\",\"type\":\"TEXT_NUMBER\",\"systemColumnType\": \"AUTO_NUMBER\",\"autoNumberFormat\": {\"startingNumber\":\"50\", \"fill\":\"000000\"}}"
Answers
-
Hi,
I just tested with the c# wrapper and it seems to be working :
SheetFetchedStore.Client.ssclient.SheetResources.ColumnResources.UpdateColumn(8767142637135748, new Smartsheet.Api.Models.Column { Id = 4810157732456324, Title = "tesjthh", Index = 0, Type = Smartsheet.Api.Models.ColumnType.TEXT_NUMBER, SystemColumnType = Smartsheet.Api.Models.SystemColumnType.AUTO_NUMBER, AutoNumberFormat = new Smartsheet.Api.Models.AutoNumberFormat { Fill = "", Prefix = "pfx", StartingNumber = 200, Suffix = "sfx" } });
Body sent :
{"fill":"","prefix":"pfx","startingNumber":200,"suffix":"sfx"},"index":0,"title":"tesjthh"}
Maybe try by specifing all properties (fill, prefix, starting and suffix) ?
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives