Field type in parent CDT is getting changed from document to anytype when child CDT is updated

Certified Senior Developer

Hello All,

We observed one issue

1. Parent CDT -> one of the columns type is document

2. We updated the child CDT (added a new column) upon updating the child CDT, the parent CDT filed type changed from document to anytype.

Did anyone face the same issue?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I do not really understand.

    In the parent there is a field of type document. Then there is some, probably nested, child CDT.

    What do you mean with "added a new column"? Is this about a new field?

    Where do you see this behaviour? Do you have some code you can share?

  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    Hello

    1. Parent CDT with document field and child CDT.

    2.

     2.1 Child CDT before the update

    2.2 Added new field in the CDT 

    3. After Step 2.2 parent CDT's fields type changed from document to number

    Thank You,

    Sneha.

     

  • 0
    Certified Lead Developer
    in reply to Sneha Yada

    The data type "document" does only exist inside Appian. If you modify it outside of Appian, it will turn into an integer as this is the underlying representation.

    I consider this to be expected behaviour.

    BTW, I recommend to manage the data structures only in CDTs and let Appian maintain the DB schema. I think this fits the low-code spirit of Appian way better than hand crafted XSDs or SQL scripts.

  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    Parent CDT is transient CDT ( not added to any data store/ CDT is not mapped any table in DB).

    In this case, is it expected that parent CDT data types that exist only in Appian get changed to number/ any type ?

    Sorry, I didn't understand "I recommend to manage the data structures only in CDTs and let Appian maintain the DB schema", can you please explain with an example?

  • 0
    Certified Lead Developer
    in reply to Stefan Helzle
    If you modify it outside of Appian

    This user is not saying they're modifying the CDT outside of Appian, though.

    , I just reproduced the described behavior in my TEST environment using 2 brand new CDTs (parent and child, similar to the ones you pictured).  The Parent CDT has 2 separate fields of Document type, and after simply adding a new field to the Child CDT, the data type of the Document field in the Parent had changed itself to "Integer" instead.

    This is definitely a bug.  I recommend you open a Support Case with Appian - this is something they'll need to address.

    Edit to add: I can also reproduce the behavior just by *minorly renaming* one of the fields in the Child CDT.  As in, I didn't even have to add a *new* field to demonstrate the breakage.

Reply
  • 0
    Certified Lead Developer
    in reply to Stefan Helzle
    If you modify it outside of Appian

    This user is not saying they're modifying the CDT outside of Appian, though.

    , I just reproduced the described behavior in my TEST environment using 2 brand new CDTs (parent and child, similar to the ones you pictured).  The Parent CDT has 2 separate fields of Document type, and after simply adding a new field to the Child CDT, the data type of the Document field in the Parent had changed itself to "Integer" instead.

    This is definitely a bug.  I recommend you open a Support Case with Appian - this is something they'll need to address.

    Edit to add: I can also reproduce the behavior just by *minorly renaming* one of the fields in the Child CDT.  As in, I didn't even have to add a *new* field to demonstrate the breakage.

Children