Skip to main content
July 20, 2024
Question

How to update a document into user records through process model

  • July 20, 2024
  • 3 replies
  • 0 views

Hi i am new to appian , I have been working on a activity where I have to generate document through ms doc from template smart service. This document generation was happening in a subprocess from there I am greeting the generated document id to parent process I am not sure whether this flow going right or not .Now I need to update this id to record for particular user like based on their profile id I need add this document which they will be able download through interface which will be another big task for a beginner . Can anyone guide me?

3 replies

karumurua531442
July 20, 2024

Hi [mention:04120ccb8dd74d76bb8fe18fa5a7ea03:e9ed411860ed4f2ba0265705b8793d05]  may I see your process model design,  generic approach would be when a action is generated capture the Id of that user into process variable, after once document id is generated, use a script to and update your record details by storing the user id and document id and pass that your write record smart service 

July 20, 2024
  • Hi [mention:3510a5189ce1477eaf2e09f5858c87e9:e9ed411860ed4f2ba0265705b8793d05]  My process model have 11 subprocess defined for different different technology so based on the profile id and the technology one subprocess will be start from there it need to updated to record so I am confused whether to use one write record ss for all Or for each sub process each write records and I didn't know the correct expression for script task I am new to this 
konduruc733182
July 21, 2024

I am not sure if you have 11 different database tables just for the differentiation of technology. If so, please re-think you approach by having a single table with an column/field for distinguishing the technology id coming from the reference data.

Coming to your question please use a script task post your document generation subprocess and use the a!update() function where the data would be your process variable and the index would be the document field and the value will be your document id. you will have to use match and select the pv based on the technology. (Not a good idea unless you have no options)

Please share your process design and also share us what make these 11 subprocess different, is it just the technology based record do you have any fields that vary.