-
Notifications
You must be signed in to change notification settings - Fork 474
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
Choose the order of column properties of a table created from the API #186
Comments
I ran into this problem too, so I looked at what Notion did in the browser when changing the order of the columns. client.submit_transaction(
build_operation(
id=collection_view_id,
table="collection_view",
path=[], # i don't know what this one is for
command='update',
args={
'format': {
'table_properties': table_properties_
}
}
)
)
That was probably too vague so i'll try to clarify with an example: table_properties_ = [
# Using list comprehension because it's easier here
{'visible': True, 'property': schema_id} for schema_id in ['c2', 'c1', 'c3']
]
|
Thanks, it has helped much! |
The creation added in #274, but to sort and changed 'visible', maybe later. |
Thanks, but I have this issue when launching the code
|
I'm trying to create some tables from a python script, however, whether I create it with specifying its schema or copying it from a pre-existing table (already created manually on notion), I can't choose the order of the columns. The columns of tables newly created or copied via the API are always automatically arranged in alphabetical order.
PS: I'm talking about the column order, not the row.
Thanks for all kind of help!
The text was updated successfully, but these errors were encountered: