Solved

How can I retrieve a field's dynamic content using graphql ?


Userlevel 4

Hello

I am looking to retrieve a field's dynamic content using graphql.

I have been using CardField and I can retrieve some information such as the name and the description. However I have been unable to retrieve the entire dynamic content that has been set in the field.

Could you please provide some guidance?
Thanks!

icon

Best answer by Leandro Almeida 20 June 2023, 16:17

View original

10 replies

Userlevel 7
Badge +11

Hi

I’m not sure if this is exactly what you want but the ‘options’ below will show the options of the checklist, radio or select fields

{
  card(id: xxxxxxx) {
    fields {
      field {
        options
        id
        label
      }
    }
  }
}
 

Userlevel 4

Hi @vicente-lemes 

I am trying to retrieve the content that is inserted in the WYSIWYG labeled “Dynamic Content” in the pipefy CMS.
 

I assume that these field types would be “short_text”?
 

For example:

Thanks!

Enrique

Userlevel 6
Badge +4

Hi @enrique.herbella

I am trying to understand better. This information contained in a dynamic field, is it on a specific Card? Or is it pre-filled content in a form? 

Are there fields connected to other Pipes and Databases, which pull this information into this dynamic field? 

I look forward to hearing from you.

Userlevel 4

Hi @leandro-almeida 

Yes the information contained in the screenshot is on a specific card. 

I am trying to retrieve the complete content in the WYSIWYG… either before or after it’s dynamic fields have been rendered. Is there a way to do that?

Thanks!
Enrique

 

Userlevel 6
Badge +4

Hi @enrique.herbella 


Maybe this query will help you to get the data for this field: 

query
{
card (id: insert_card_id)
{
child_relations
{
cards
{
id
title
}
id
name
pipe
{
id
name
}
}
}
}

 

Userlevel 4

Hi @leandro-almeida 

I have tried your query but unfortunatly the information it returns is incomplete.

Is there a way to retrieve the entire content that has been inserted in the WYSIWYG for a given field, either before or after it’s rendering?

 

Userlevel 6
Badge +4

Hi @enrique.herbella 

I apologize for the delay. I tried several ways and it didn't work. 

My friend Terry very kindly helped me and I think now I got the right query: 

{
phase(id:xxxxxxxxx){
name
fields{
id
label
description
}
}
}

With her I got the fixed information that is in this phase: 

Results: 


However, this query will only get the fixed information that is written in the dynamic field, everything that is variable (dynamic fields from other previous phases) will be in other phases. 

Do a test with it. 

Userlevel 7
Badge +13

👏👏👏👏👏

Userlevel 7
Badge +13

👏👏👏👏👏👏

Userlevel 7
Badge +15

Very good!

Reply