Skip to main content

Find all board items assigned to a person

  • March 16, 2023
  • 8 replies
  • 1147 views

How do I create a query to give me all items in a board assigned to a user? I can do it if there’s only one person assigned, but if multiple people are assigned I cannot get it to work. If a query cannot do it, how would I do it combining a query with Javascript?

8 replies

BiancaT
Forum|alt.badge.img
  • monday.com Team Member
  • March 30, 2023

Hey @wfc_woody!

Would you be able to elaborate a little further on the issue you’re experiencing here when filtering tasks for a specific person in your board? When using advanced filters, even if multiple people are assigned, the relevant person’s tasks should still pull. You’re welcome to send over a screenshot or screen-recording to demonstrate this issue 🙏


  • Author
  • New Participant
  • March 30, 2023

Sorry - I should have been clearer. This is a query to the Monday.com API


BiancaT
Forum|alt.badge.img
  • monday.com Team Member
  • March 30, 2023

Ah apologies! I might move your query over to our developer community who are experts in this field 👍 This will automatically happen so no need for any action on your end 🙂


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • April 2, 2023

Hello @wfc_woody,

As you said, if the people column has more than one user selected, then items_by_column_value would not be a viable option.

I recommend querying for all your items (querying only the value from the people column):

{
  boards(ids: 1234567890) {
    items {
      id
      column_values(ids: "person") {
        value
      }
    }
  }
}

and then checking on your end the values in the response and saving the item ID of the items that have that specific user in the array of user IDs.

Let me know if you have any questions!

Cheers,
Matias


  • Author
  • New Participant
  • April 12, 2023

Thanks Matias. I thought that that would be the way to approach it but I wanted to make sure that I wasn’t missing anything. Many thanks for your help


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • April 13, 2023

Glad to help @wfc_woody !


  • New Participant
  • February 5, 2024

Hello @Matias.Monday : when I try above code. I got the error “Field ‘items’ doesn’t exist on type ‘Board’”,


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • February 5, 2024

Hello there @PR_kotla and welcome to the community!

I hope you like it here 💪

That query belongs to a deprecated API version.

You can use items_page instead (as explained here).

Let me know if you have any other questions 🙂

Cheers,
Matias