Is it possible to update CDT structure dynamically?

Certified Lead Developer

For one of the use case we are altering table structure (add / remove columns) programmatically using stored procedure call from Appian process. We need to update underlying CDT, is it possible?

  Discussion posts and replies are publicly visible

Parents
  • No, that is not possible. CDT structures have large impacts and changing the structure without reviewing where fields are called in your application can have consequences. What is your use case for having to add/remove columns and why do you have CDTs for those tables?

  • 0
    Certified Lead Developer
    in reply to Danny Verb

    Thanks for quick response.

    We need to implement dynamic forms for user inputs and csv injection. To achieve the same we have implemented following table design.

    We also need to display form values from Table_formValues in a grid, which is very challenging because we do not have traditional table structure.

    Can you please share your inputs for displaying form values in a grid.

    As the alternative solution we were thinking to have flat table for form values and alter table structure dynamically when fields are added or removed. However as you suggested it is not possible to alter CDTs so this solution will not work.

    Table_formMetadata

    formMetadataId

    fieldName

    fieldType

    fieldLength

    1

    Report Link

    Text

    500

    2

    Issue Name

    Text

    50

    3

    Issue Summary

    Text

    200

    4

    Date Reported

    Date

    date

    5

    Date Closed

    Date

    date

    6

    Risk Rating

    Number

     

     

    Table_formValues

    id

    formId

    formMetadataId

    fieldValue

    1

    1

    1

    link1

    2

    1

    2

    issue1

    3

    1

    3

    issue1 summary

    4

    1

    4

    10/1/2020

    5

    1

    5

    10/20/2020

    6

    1

    6

    1

    7

    2

    1

    link1

    8

    2

    2

    issue2

    9

    2

    3

    issue2 summary

    10

    2

    4

    10/2/2020

    11

    2

    5

    10/20/2020

    12

    2

    6

    3

    13

    3

    1

    link3

    14

    3

    2

    issue3

    15

    3

    3

    issue3 summary

    16

    3

    4

    10/5/2020

    17

    3

    5

    10/10/2020

    18

    3

    6

    3

  • My only suggestion would be using JSON structures instead of traditional SQL tables. This allows you to still query data from mySql but one of your columns would be TEXT storing the JSON structure of your dynamic forms

Reply Children
No Data