Skip to main content
Solved

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

  • June 1, 2023
  • 3 replies
  • 210 views

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. 

3 replies

Leandro Almeida
Pipefy Staff
Forum|alt.badge.img+7
  • Customer Support
  • 96 replies
  • June 1, 2023

 

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
  • New Member
  • 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
  • Customer Support
  • 96 replies
  • Answer
  • June 5, 2023

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.