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
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives