findFolderByName() does not exist?

Hi,

following the tutorial for HR_Assessment in "Building a process" there is a folder created for a hire.
But any time the process is resartet for debugging or testing, the folder "HR_Lucie_Pressnel" for example gets created over and over again, each time with an new id, but same name.

I tried to modify the example by testing for the existence of a folder with the same name, but cannot find a suitable function/Smart Service.

Why?

Some people suggest to use a database to store all the information the KC or the folders already represent. And it assumes that you always have a database with this information to search for.

But is it realy neccessary to build complex database storage and query function for a simple

(list) listDir()  or (int) getDocumentByName(name) function?

Thx

Olaf

  Discussion posts and replies are publicly visible

Parents
  • Hi Olaf.

    It's not necessary to develop extensive database structures to work with files and folders.
    It's typically enough to store the folderId property ("id").

    You can capture this value on the outputs tab of the create folder task with a custom output like: folder(ac!NewFolder,"id") .

    Store the result into a PV of type number (integer).
    By placing that value alone in the database, you can reference the folder created for a specific case easily as needed.

Reply
  • Hi Olaf.

    It's not necessary to develop extensive database structures to work with files and folders.
    It's typically enough to store the folderId property ("id").

    You can capture this value on the outputs tab of the create folder task with a custom output like: folder(ac!NewFolder,"id") .

    Store the result into a PV of type number (integer).
    By placing that value alone in the database, you can reference the folder created for a specific case easily as needed.

Children
No Data