hi @TPCouriers
Unfortunately monday does not have a concept of “order”. Users can drag and drop columns, items and subitems in any order they like. You could try to use the newest_first field to sort the items or the created_at property which gives you an order of “oldest” to “newest”, but not the order which appears in the UI.
An items/subitems order property must be stored somewhere, at least to list the items in a custom order that’s not a simple “order by column value”.
It would be really useful if such value were available thru API.
They clearly have some way of knowing the order the user has chosen though because otherwise it would forget each time you reload the board. In my use case the order the user chooses is just as important as the items themselves.
It’s impractical to expect users to redo an “order” column every time something changes, which is the work around I’m currently having to use (and to make it worse, Make.com reads my “order” column as text and not numeric when I try to sort, so I’ve had to change it to a text column and use 01, 02, 03 etc).
Sure an “order” is stored somewhere, but just not accessible through the API.
Hello everyone,
As Bas mentioned, the order itself is not available via API.
Having said that, I want to thank you for the feedback and I will add it to our request for a “order” field to be available via API.
Cheers,
Matias
Any updates on this and does the product team even notice all the problems discussed in this community?
I am running into new problems and limitations with Monday every single day. All of which were discussed in this forum multiple times. All of which super basic things. Please listen to your users.
It would be nice to prioritize this problem as the change in the API should be done within an hour (estimate from a coder who implemented multple APIs).
Hello @MondayUser123123,
I do not have an update on this as of today.
If you have any technical issues, please send us an email to appsupport@monday.com and we will be glad to take a look into it for you 😁
Cheers,
Matias
I’ve found a couple of ways to order subitems. Posting here for posterity.
If there was a __parent_id__ special column id that could be used in an nItemsQueryRule!], like __item_id__ can, that’d be AMAZING! We should also be able to use the __last_updated__ and __creation_log__ in an ItemsQueryRule!].
Use subitem ids directly (items)
{
items(ids: d<comma-delimited list of subitem ids>] newest_first: true) {
id
name
column_values {
id
text
}
}
}
Use subitem ids directly (items_page)
The example below also returns newest first. You could use __last_updated__ if you want to order by which ones are newly modified.
{
boards(ids: <subitem's board id (different than item's board id)>) {
items_page(
query_params: {
rules: e
{column_id: "__item_id__", compare_value: u<comma-delimited list of subitem ids>], operator: any_of}
],
operator: and,
order_by: b{column_id:"__creation_log__", direction: desc}]
}
) {
items {
id
name
column_values {
id
text
}
}
}
}
}
Search by something in the subitem
{
boards(ids: <subitem's board id (different than item's board id)>) {
items_page(
query_params: {
rules: e
{column_id: "<date column id>", compare_value: u"2024-01-01", "2024-12-31"], operator: between}
],
operator: and,
order_by: b{column_id:"__creation_log__", direction: desc}]
}
) {
items {
id
name
column_values {
id
text
}
}
}
}
}
You can get the subitem board id via:
The item’s board id is found in the Monday.com url after /boards/.
{
boards(ids: <item's board id>) {
items_page {
items {
subitems {
board {
id
}
}
}
}
}
}