Skip to main content
Solved

Filter phases by name in Pipefy


Hello everyone. How can i filter phases by name? 
I don't know either. Here's what I'm trying:{
 allCards(pipeId: 123, filter: {field: "current_phase", operator: equal, value: "456"}) {
   edges {
     node {
       id
       title
       current_phase {
         id
       }
     }
   }
 }
}
But it says: Something went wrong :-(Any help would be much appreciated.

Best answer by Marcos Carvalho

Hi there! Currently, our API only supports searching by the card's title, label, assignee, or when it was last updated. Here's an example of a search that involves the first three mentioned: 

 

{
  cards(pipe_id: 1, search: {assignee_ids: [1, 2, 3], label_ids: [4, 5, 6], title: "abc"}) {
    edges {
      node {
        id
      }
    }
  }
}

 

And here's a query that filters a card based the date it was last updated: 

 

{
  allCards(pipeId: 11111, first: 5, filter: {field: "updated_at", operator: gte, value: "2020-04-02T00:00:00-00:00", AND: [{field: "updated_at", operator: lte, value: "2020-04-03T00:00:00-00:00"}]}) {
    edges {
      node {
        id
        title
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

 

 

View original

3 replies

Marcos Carvalho
Pipefy Staff
Forum|alt.badge.img+6

Hi there! Currently, our API only supports searching by the card's title, label, assignee, or when it was last updated. Here's an example of a search that involves the first three mentioned: 

 

{
  cards(pipe_id: 1, search: {assignee_ids: [1, 2, 3], label_ids: [4, 5, 6], title: "abc"}) {
    edges {
      node {
        id
      }
    }
  }
}

 

And here's a query that filters a card based the date it was last updated: 

 

{
  allCards(pipeId: 11111, first: 5, filter: {field: "updated_at", operator: gte, value: "2020-04-02T00:00:00-00:00", AND: [{field: "updated_at", operator: lte, value: "2020-04-03T00:00:00-00:00"}]}) {
    edges {
      node {
        id
        title
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

 

 


Grafeno
  • New Member
  • 5 replies
  • February 13, 2022

Funny. I was precisely looking for this. How to use the allCards function to filter cards by currentPhase, and retrieve all that are under a named phase. Is this not something most users would want to be able to do?


Roberto Chavarria
Pipefy Staff
Forum|alt.badge.img+5

Hi there @Grafeno!

Unfortunately we don’t have that specific filter available natively on the allCards query. You’d need to create a script using a programming language and within the script you can input the nodes (card objects) that attend your code parameters (if current_phase = 123) into an array. If you’d like some boiler-plate code to get started, you can check out this page, which has a playground that helps you with the minimum code in some languages (
https://developers.pipefy.com/reference/graphql-endpoint


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings