Sort queries by updated_first option

Hello everyone,

This would limit the number of queries necessaries, as we might skip asking for next pages in some use cases.

Let’s say you query every day to get all changes in all items for a specific board.
One way to do it is to query multiple pages.
By ordering the items from the latest update to the oldest, you might know that 2 pages are usually enough.
So you query 3, check if the last updated date on the 3rd page is more than a day old, and only query more pages if you need them.

Regards,
Laurent, web dev @ Synolia, platinum partner

Hi again @LaurentConroux!

Ahh yes, so at this time the order_by: used_at argument is only applicable for a few of our objects. Did you have a specific object in mind? This way I can submit feedback for our team.

I do know that our boards object does allow for this argument, but not our items object for example.

Let me know!

@Helen yes the given example does concern Items queries.

I would says items() and items_by_multiple_column_values() are concerned.
I expect items_by_column_values() might become deprecated as it seems redundant now.

Others queries might benefit from this, even future queries like docs() and dashboards() when we will have them :wink:.

Thanks,
Laurent

@LaurentConroux

That’s a great suggestion! I’m a little curious in terms of the workflow - perhaps it would make sense to query activity log events instead? You could specify specific column IDs and see all changes applied to a column. This would also return a timestamp of the change, so you could use that to cross-reference latest changes.

Alternatively, would it make any sense for you to query activity log events, using the “from” and “to” arguments after the latest query had run?

Just throwing in some ideas and I’m wondering if those would be of any help here.

-Alex

1 Like

@AlexSavchuk thanks a lot I had overlooked that query. :man_facepalming:

That should answer our needs when we want to ask data on a regular time basis.

1 Like

@LaurentConroux

Oh yay! I’m glad that would work here :slight_smile:

-Alex

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.