Problems with a folder ID

 I'm experimenting with document management for the first time, and seem to have hit an issue.

I created a very small process, which has the createFolder smart service as the first step in the process. The node is configured correctly and uses pp!id as the folder name to create. I'm aiming to create a new document folder for each process that is started.

I've configured the node to return the createdfolder name in the results of the node outputs tab to a pc called FolderName

 

At run time - the folder is created correctly and using the process monitor I can see the FolderName is populated with the ppID. (lets say it's 12345 for now).

I then created an interface with the upload multiple component on the form. I created an ri!foldername and an ac!foldername and so when I call the form I provide the foldername from the results set. Thus storing the docs in the new folder. This has appeared to work.

I then created a new interface to display the attached documents within the specific folder, using the document browser. My problem is that even thought I am providing the same foldername (12345) to the component it is not listing the docs.

When I try to replicate the issue via the designer, I populate the ri!foldername and pick the folder I want - and it works. However I've noticed that even though I pick 12345, the folderID is a different number, which I'm guessing is an internal ID. So my question is how do I mimick this for run time. I must need to translate the foldername I have had returned into the internalID. (all my variables are folder type). I've tried to use tofolder, but that doesn't seem to help.

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer
    When you save the created folder in a PV of type "folder", regardless of the fact that the process monitor displays the folder's name "12345" to you, it is storing and passing the Folder ID (which is system-generated and not manually changeable) in the background. If you save the "folder" object into a PV of type int, you'll see the ID. My best advice would be to largely ignore the folder name moving forward and worry about what the generated folder ID is.
Reply
  • +1
    Certified Lead Developer
    When you save the created folder in a PV of type "folder", regardless of the fact that the process monitor displays the folder's name "12345" to you, it is storing and passing the Folder ID (which is system-generated and not manually changeable) in the background. If you save the "folder" object into a PV of type int, you'll see the ID. My best advice would be to largely ignore the folder name moving forward and worry about what the generated folder ID is.
Children