Skip to main content
May 10, 2025
Solved

Locate an specific subfolder and delete the documents included in it and delete this subfolder

  • May 10, 2025
  • 3 replies
  • 0 views

I have being seeking information about my problem but I haven't found the properly anwser. I have a constant as you see:

I'm creating dinamic subfolders inside this folder. Inside them I'm going to create documents. In some situations I will need to delete the documents in a particular subfolder and delete the subfolder as well. I have cheked the documentation (delete folder smart service, delete document smart service) but I don't know how to use it because I need to provide a folder type in the Input variable and I haven't this type of data. I have a variable with the name of the subfolder that is dinamically generated (for instance, today's date) and I need to use this name to delete the subfolder as well. Is there any way to do so?

Thanks in advance!

    Best answer by stefanhelzle0001

    Appian identifies folder by a numeric ID. When creating folders, I highly recommend to store that ID somewhere in a record. This makes any deletion operations very simple.

    If you maintain an existing folder, and someone else made such decisions in the past, the plugin "Content Tools" with the function "findcontentbyattribute" can find folders by name.

    3 replies

    stefanhelzle0001
    May 10, 2025

    Appian identifies folder by a numeric ID. When creating folders, I highly recommend to store that ID somewhere in a record. This makes any deletion operations very simple.

    If you maintain an existing folder, and someone else made such decisions in the past, the plugin "Content Tools" with the function "findcontentbyattribute" can find folders by name.

    May 10, 2025

    Thanks Stefan. I'll check your answer to solve my problem.