Moving documents to existing folder issue

Certified Associate Developer

Hi Team,

I'm using a single process model for creating employee and updating employee(related action). While creating employee simply i create a new folder and move employee documents there. But incase of updating i need to add documents to the same folder. I don't know how to achieve this. I tried with tofolder("emp 1") function with a or gate to check whether it's updation or creation but getting error. Then i removed or gate and checked with the create folder then move documents methods again for updation process it creating a new folder with same name. Need support on this..

Thanks in advance 

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    As Mathieu already mentioned - in Appian, a folder is stored as an ID (that is the only unique aspect of any given document folder, to put it simply).  When you create a folder based on a particular person, you will need to store its ID (integer) into a place that's easy to look up later on - like a column on that person's database table row (if you don't have a database table to store data related to each employee, you will need to set one up).  Then later on you can simply reference the folder by id after querying the database row for that person.  The appian type of "folder" really just holds an integer, so you can cast between the types pretty freely.

Reply
  • 0
    Certified Lead Developer

    As Mathieu already mentioned - in Appian, a folder is stored as an ID (that is the only unique aspect of any given document folder, to put it simply).  When you create a folder based on a particular person, you will need to store its ID (integer) into a place that's easy to look up later on - like a column on that person's database table row (if you don't have a database table to store data related to each employee, you will need to set one up).  Then later on you can simply reference the folder by id after querying the database row for that person.  The appian type of "folder" really just holds an integer, so you can cast between the types pretty freely.

Children