Smartsheet API - Updating Dropdown Values

190 views Asked by At

I need to create a form where the user can submit multiple dates of their choice. Smartsheet forms doesn't support multi-date picker and the only option is to have those dates added to the dropdown.

Can someone please link me to the smartsheet documentation or let me know whether it's possible at all to feed values into a dropdown list using the API?

I need the API to send all dates future except today's date.

I have tried using ddupdate along with automations on smartsheets. I loaded all dates in the a separate sheet and used the smartsheet automation to move rows and stuff, but it ends up taking away the entire sheet instead of just one.

1

There are 1 answers

1
Neil Cannon On

Not mine, but it works. Does this help? I know it doesn't finish the project, but maybe it would get you started...

import smartsheet

smartsheetClient = smartsheet.Smartsheet('access_token')
sheetid = 'sheet_id'
sheet = smartsheetClient.Sheets.get_sheet(sheetid)

listOptions = ["bob","joe","sally", "matilda"]

column_name = "Testing"

for column in sheet.columns:
    if column.title == column_name:
        columnid = column.id
        break

cs=smartsheet.models.Column({

        'title':"Testing",
        'type':'PICKLIST',
        'options': listOptions,
        'index':2,
        'validation': True
        })

r=smartsheetClient.Sheets.update_column(sheetid,columnid,cs)