Solved

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


Userlevel 2
Badge

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...

icon

Best answer by Leandro Almeida 5 June 2023, 19:04

View original

3 replies

Userlevel 7
Badge +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

Userlevel 2
Badge

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?

Userlevel 7
Badge +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. 

Reply