Rich Text Item link property to use two services simultaneously

Certified Senior Developer

Hi Devs,
I want to use to services in my rich text part, in this on the click of the link and the csv document will be downloaded in the system as an export file,
Simultaneoulsy I want to start the process on that click only to delete that csv document that is created internally by appian, so that my app does not pile up with time in the future
Attaching the snip for your reference:





  Discussion posts and replies are publicly visible

  • 0
    Certified Senior Developer
    in reply to Mike Schmitt

    This CSV is genereted by the interface code itself, data source is view
    I created the PM, for implementing the cleanup
    But i am not able to find a service to clean the contents of that folder
    I know to set a auto timer, but not able to get the right service to delete the created csv files in the application at the backend

  • 0
    Certified Lead Developer
    in reply to saifalikhan13
    But i am not able to find a service to clean the contents of that folder

    You merely need the "delete document" smart service in a process model...

    That is what I was trying to suggest above:

    Alternatively you could build a whole separate process model which runs nightly, gets all documents in the folder, and deletes documents older than X days for example. 

    To clarify, in the first node you'd use a rule to grab all documents from the folder (since it looks as if they're all stored in the same folder).  Then loop over all the documents and return only documents older than your chosen threshold, to be stored in a PV array.  Then loop over the "delete document" smart service for each of those document IDs.