Skip to content

Python: Update Summary Fields example misleading #114

Description

@aricke42

With Python SDK, attempting to update Summary Fields on a sheet:
https://smartsheet-platform.github.io/api-docs/?python#update-summary-fields

I cannot get the example to execute:
summary_field1 = smartsheet.models.SummaryField() summary_field1.type = ColumnType.TEXT_NUMBER summary_field1.object_value = smartsheet.models.StringObjectValue('Sally Smart') summary_field1.index = 2 summary_field1.title = 'Author'

I find that I must do:
summary_field1.type = "TEXT_NUMBER" Removing ColumnType reference

No amount of fiddling will allow the object_value attribute to be assigned any objects:
summary_field1.object_value = smartsheet.models.StringObjectValue('Sally Smart')

I have to directly assign the value summary_field1.object_value = "Sally Smart"

In cases of simple numbers or string, it's not clear that one even needed to use the object_value attribute and not the display_value attribute.

I am unclear what one will need to do when required to update a field type such as Contact that requires the object_value.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions