Skip to main content
shikhat
April 22, 2021
Question

errno: 150 "Foreign key constraint is incorrectly formed") (APNX-1-4178-000) -- Appian Data store error

  • April 22, 2021
  • 3 replies
  • 0 views

Hi Community,

So I am creating a new CDT from scratch, I have 5 fields in it .No database table is created . Primary key is defined in CDT. One of the fields c_address I have defined as text type and checked the array checkbox. All saved , but I am not able to publish the datastore. Getting the below error. Basically I am checking how array functionality works for a text type or any other type. Kindly share some insight.

Thanks

    3 replies

    April 22, 2021

    Hi Shikha,

    Could you please create address cdt first and then refer the same in your new CDT.  Please  refer the below link for sample CDT's

    1)Employee-refer the employee address in your cdt.

    2)Employee Address -> pls create this one first

    https://docs.appian.com/suite/help/21.1/cdt_design_guidance.html#img857

    Hope this helps!

    Thanks

    Have a Good Day!

    shikhat
    shikhatAuthor
    April 22, 2021

    Hi , 

    Thanks for reply . Just to confirm the emp_address acts as a foreign key for employeeeCDT ,right? Also , what is use of array check box defined for the specific fields. What purpose will that serve for that particular column value defined as array type from DB point of view too? That database field will be able to store multiple address if checked for a single employee ,something like below:

    Ename  Eaddress

    ABC    address1

    ABC    address2

    April 22, 2021

    Hi Shikha,

    Just to confirm the emp_address acts as a foreign key for employeeeCDT ,right? - > Yes Correct 

     what is use of array use of array check box defined for the specific fields? -> more that one value is possible for that field

    What purpose will that serve for that particular column value defined as array type from DB point of view too? ->1 to many relationships

    Yes database field will be able to store multiple address 

    Please let me know if this helps!