Getting people column values by userId

Hi folks,

I’ve got a major issue with the monday.com api when it comes to getting column values for a people column.

query {
      items_by_multiple_column_values(
        board_id:${boardId},
        column_id:"person",
        column_values:["${personName}"]){
        column_values(){
          id
          value
        }
      }
    }

Using the persons name and not their userID is not great and this is what’s suggested in the docs

There are like 40,000 James Smiths in the US and if I’m developing a solution for a large corporation, it’s fairly likely that I may get column values for other people.

Our users won’t be happy if that happened as it creates distrust in the platform…

I know that the monday.com team is aware of this as it’s in their docs as a limitation, but is there any intention to resolve this issue in the near future? If so, is there a timeframe for when we can expect this issue to be resolved?

On an unrelated note, it would also be great if we can get results for items where more than one user is assigned.

Hi @aalnussairi,

Thanks for writing in and for sharing your invaluable feedback! I just moved this to our Feature Requests section for our other devs and users to comment on and upvote.

I’m also going to make a note to our developers about this feature request. Hopefully they change it sooner rather than later-- I can see how having 40,000 Jane Smiths would not be helpful haha.

I can’t give a specific timeline as to when this issue will be resolved, but with enough user upvotes, the faster it will be addressed.

Regarding your last question of getting results where more than one user is assigned, you can use our items_by_multiple_column_values() method to search for multiple values within a single column. Is this what you’re looking for?

1 Like

Hi @Helen,

Thank you for you help, and for making a note of this to the R&D team.

Unfortunately, the docs suggest that the items_by_multiple_column_value() method has limited support for people columns and the below are the limitations set out.

Will only return results for items where a single user is assigned. Doesn’t support arrays of users, will only return results based on actual user name and not User ID.

Cheers!

@aalnussairi

Thank you tor getting back to us here! I’m afraid you are correct, and the docs are also a source of truth on this - even the items_by_multiple_column_values will not return results for columns with multiple people selected. I’m sorry for the inconvenience.

-Alex

1 Like

Hi @AlexSavchuk,

Thank you for your response and it’s fine!

I’m only raising this issue so that the relevant teams are aware, if they aren’t already, of these limitations and hopefully provide some visibility on how those limitations could potentially affect users.

Cheers!

1 Like

Ah, got it. Thanks so much for your understanding and I appreciate you looking out for other developers using our API :slight_smile:

-Alex

Hi @aalnussairi,

There actually is a “hacky” way in which you can query items with multiple people column values. You can just list out the people in the same indices. Keep in mind though, that order is important here. As such, it is a good idea to list out all the combinations of people. I understand this could be a headache the more people are assigned, but again, this is just a “hacky” method.

For example, here is my board where I have one person assigned to an item each, and then both people assigned to the same item:

In my query, if I list out each user individually and then the two combinations of these users together, I can get a response that returns all three items.

Here is my query:

query {
  items_by_multiple_column_values(board_id: 123456, column_id: "people76", column_values: ["Helen Main", "Helen Monday", "Helen Main, Helen Monday", "Helen Monday, Helen Main"]){
    id
  }
}

The difference is in the placement of the comma, whether it’s inside or outside of the quotation marks.

This would be the resulting response:

{
  "data": {
    "items_by_multiple_column_values": [
      {
        "id": "123456789"
      },
      {
        "id": "234567890"
      },
      {
        "id": "345678901"
      }
    ]
  },
  "account_id": 123456
}