Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Update Summary Fields example misleading #114

Open
aricke42 opened this issue Jan 28, 2020 · 0 comments
Open

Python: Update Summary Fields example misleading #114

aricke42 opened this issue Jan 28, 2020 · 0 comments

Comments

@aricke42
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant