Skip to main content
January 7, 2025
Question

Write related records

  • January 7, 2025
  • 9 replies
  • 0 views

I have 3 records having one to many relationship  Timesheet(ID,IS_ACTIVE), Audit(ID,TIMESHEET_ID,IS_ACTIVE) and Comments(ID,AUDIT_ID,TIMESHEET_ID). When I tried to use single write records smart service, I am not able to populate value for TIMESHEET_ID column value in "Comments" table. Is it expected or do we have any other way to handle this?

    9 replies

    gundamanen723137
    January 7, 2025

    You mean to say you can bale to populate timesheet id in Audit but not able to populate in Comments.

    January 7, 2025

    Yes correct. In write records, the record input is "Timesheet". Record structure will be like below


    Timesheet(

    ID:1,

    IS_ACTIVE:1

    AUDIT*(

    AUDIT(

    ID:1,

    TIMESHEET_ID:1,

    COMMENTS*(

    COMMENTS(

    ID:1,

    TIMESHEET_ID:null,

    AUDIT_ID:1

    )))))

    stefanhelzle0001
    January 7, 2025

    When writing the main record plus related records to the DB, Appian will take care of the foreign keys, when you configure your relationships correctly.