Good day everyone,
I am new to Appian and working on a project. I have a database with the following tables: Employees (1:M) Document Status (M:1) Training Document. I am trying to make a form that allows managers to assign each employee to multiple training documents at the same time. So, I have a form like below with a checklist of all training documents (fetched through an expression rule)
When the form submits, I need the process model to write to the database multiple times to the document status CDT. For example, based on the picture above, there would need to be three entries to DB tracking status for each training document and employee. How should I set up the interface and/or process models. Any advice/suggestion would be greatly helpful!
Best,
Harsha Gurram
Discussion posts and replies are publicly visible
Do you have a specific reason to use CDTs? Records are the hot new thing and CDTs are on the way out.
With records and record relationships, you can make Appian do all the heavy lifting for you. Check the documentation, tutorials and online trainings to get started.
Traditionally, you would have to use startProcess and have a process that would write everything in sequence. Now though, its possible to do in one single Write Records since the advent of Write Related Records.
I found the write related records node in the process model. But, I don't know how to set up the interface correctly to be able to use it. Is there any example or resources you can point to where I can learn from? I know I am supposed to pass in a list of records but, I am not sure how I create and write to a rule input with multiple records.
From the interface, if you don't want to use a!startProcess, you can use a!writeRecords directly.
https://docs.appian.com/suite/help/23.4/Write_Records_Smart_Service.html#a!writerecords()
But you'll need the proper relationships to be setup if you want to persist multiple record types in one Write operation. Please see here for more details:
https://docs.appian.com/suite/help/23.4/record-type-relationships.html#add-relationships
I used records to already set up the relationship between the variables. I am just trying to figure out how I can set up the interface so that I can have multiple records be created in the document status database when I pressed submit. (I am sorry if I didn't explain this correctly. I started learning Appian in the last few months and am trying to build a small project) Is there any specific resources or examples you can point to for reference?