multiple CDT from a single database table

Is that possible to create multiple CDT from a single database table ?

  Discussion posts and replies are publicly visible

Parents Reply
  •  

    Database Level Default Setting and CDT for writing and reading:

    To insert the database table field's default value using write to datastore entity follow the below steps:

    • Create a table with one or more default value field
    • When creating a CDT from DB table for inserting values, don't include the default value field. So that, while inserting a value, table will take the default value.
    • If you include the default value field, Appian will assign null value to the field. This will lead to overriding of the default value in the table.

    To populate the database table field's default value on the screen

    • Create a CDT from DB table for populating values, include the default value field. So that, while fetching  data from table, system will pull the default value.
    • Remember you need this separate cdt than what you created before

    Alternatives with intermediate modification:

    To insert the database table field's default value using write to datastore entity follow the below steps:

    If you want to have default values in the table upon insert, you can add the default values to the required attribute(s) in the following ways:

    • During any field saveInto:{}. This is at Interface level
    • Inside the process after completion of the User Input Task and before Write to Data store Entity.

    In both ways, you can also define any logic that determines the default value.

    To populate the database table field's default value on the screen

    You can assign the default values to the CDT attributes, before populating on the screen.

    • Fetch the values from the table and map it to cdt
    • Update the default value to CDT attribute where default value is required
    • Populate the CDT values on the screen
Children
No Data