Skip to main content

Retrieve element name by id

  • January 24, 2024
  • 3 replies
  • 173 views

Hey, I´m trying to get an element name by its “id”. Basically a very straightforward task but I cant make it work. The “items_page_by_column_values” cant seem to find by “id” like so:

{
  items_page_by_column_values (board_id: 1324701454, columns: {column_id:"id", column_values: "ID OF THE ITEM E.g. 5823583"}) {
    items {
      id
      name
    }
  }
}

…doesnt return my element and this one does find the element but doesnt give me the name of my element…super annoying…

  query {
  items(ids: ID_OF_THE_ELEMENT) {
    column_values {
      column {
        id
        title
        
      }
      id
      type
      value
      text
     
    }
  }
}

How to retrieve an element NAME by its id??!?

3 replies

basdebruin
  • Community Expert
  • January 24, 2024

If you need only the name of the item it is very simple like this

query {
  items(ids: ID_OF_THE_ELEMENT) {
    id
    name
  }
}

  • Author
  • New Participant
  • January 24, 2024

okay weird, as mentioned in my second code example I thought “items” cannot return name as a “feature” api 2…however. It works now thank you very much!


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • January 24, 2024

Thank you @basdebruin for the help!!!