Skip to main content
June 2, 2025
Solved

How do i change the field of primary key in a record ?

  • June 2, 2025
  • 10 replies
  • 0 views

I gave an field as an primary key by mistake and now i want to give the primary key field to another field. Can anyone help me with that, iam new to appian.

    Best answer by tejak2639

    Hi [mention:e6afcf0941054cb6b3855cfc2340cdab:e9ed411860ed4f2ba0265705b8793d05] 
    If you have created a new field JOB_POSTING_ID after there are some entries inserted in the table, then while creating the field keep the default value as NULL(If not null then 0's will be stored to all the fields and above error will be shown) and apply the auto increment (Click on check box).

    10 replies

    adityag9712
    June 2, 2025

    If your record was created from a database table, you need to update the primary key in the database table. After that, perform a remapping of the record source in Appian. Once the remapping is complete, the changes will be reflected in the record type

    June 3, 2025

    This is the error iam getting when iam trying to give the primary key as a new field.

    tejak2639
    tejak2639Answer
    June 3, 2025

    Hi [mention:e6afcf0941054cb6b3855cfc2340cdab:e9ed411860ed4f2ba0265705b8793d05] 
    If you have created a new field JOB_POSTING_ID after there are some entries inserted in the table, then while creating the field keep the default value as NULL(If not null then 0's will be stored to all the fields and above error will be shown) and apply the auto increment (Click on check box).

    harshas2775
    June 2, 2025

    FIrst you need to make the changes in your database table by dropping the primary key there and applying it to to the intended column. Once done in database you can update the mappings in the record. 

    konduruc733182
    June 3, 2025

    Hello [mention:e6afcf0941054cb6b3855cfc2340cdab:e9ed411860ed4f2ba0265705b8793d05] 

    Please refer this basics of SQL which would help you achieve. www.w3schools.com/.../sql_primarykey.ASP