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
I would suggest you create a constant for your folder and use that instead.
You can do tofolder on a folder id if you stored it in the database in relation to your employee. Not the folder name (it is not unique)
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.
Thank you Mike. It's working fine now