Skip to main content
Solved

Not possible to retrieve cards from a specific pipe with its start_form_fields


andre-infineat
Forum|alt.badge.img

I'm trying to use the api to fetch all cards from a specific pipe and read through a few of start_form_fields from each of those cards. But I have not found any way to retrieve start_form_fields...

Best answer by Leandro Almeida

Hi André! 

Sorry for the delay. Yes, I did a test and using this query, I got the values from the start form, but, using the ID of the phase where the card is: 


{
  phase(id: XXXXXXXXX) {
    id
    name
    cards_count
    cards{ edges {node { id, title, fields {name, value} }}
    }
  }
}

 


Please, see if this is what you want. 

View original
Did this topic help you find an answer to your question?

3 replies

Leandro Almeida
Pipefy Staff
Forum|alt.badge.img+7

 

Hello, how are you? ðŸ˜‰

 

You can get the IDs of the fields in your initial form with this query: 

 

{
  pipe(id: pipe_id) {
    start_form_fields {
      id
      internal_id
      label
      type
      options
    }
    phases {
      fields {
        label
        internal_id
        type
        options
      }
    }
  }
}


Then with the field IDs, you can set up another query to get the data from those fields. 

Hope this helps


andre-infineat
Forum|alt.badge.img
  • Author
  • Regular Participant
  • 1 reply
  • June 2, 2023

Thanks Leandro, but the field ids I already managed to get. Still not sure how to retrieve the cards with the field values for these fields I got the ID. Can you please share an example?


Leandro Almeida
Pipefy Staff
Forum|alt.badge.img+7

Hi André! 

Sorry for the delay. Yes, I did a test and using this query, I got the values from the start form, but, using the ID of the phase where the card is: 


{
  phase(id: XXXXXXXXX) {
    id
    name
    cards_count
    cards{ edges {node { id, title, fields {name, value} }}
    }
  }
}

 


Please, see if this is what you want. 


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