Casting from Record Type Field to a Folder

I want to keep documents from each speaker in a separate folder.  I create the folder in a separate process and store the name of the folder in a field the Record Type of Speaker.  Now when I want to upload documents, I need to set the Folder parameter in the a!fileUploadField().  When I set the target to the field, i get an error that Appian cannot cast the value of Record Field into a type of folder.  I guess that I have to use the Cast() function to do that. However, I can not figure out how to format the Cast function to do that.  I read the documentation for Cast() and TypeOf(), but I am still lost.

target: cast( typeof("folder"),'recordType!PMSO Speaker.fields.folder'),

Could someone please let me know how to proceed?

  Discussion posts and replies are publicly visible

Parents
  • Thank you to everyone that responded.  This is how i was able to fix my issue.

    1. I changed the format of the folder field in the database from Text to Integer.

    2. In the process model in the Create Folder smart service where I create the folder for the speaker, I created a custom output. tointeger(ac!NewFolder) and saved that to the folder id field in the speaker record.

    3. In the Interface is set the target to: target: tofolder(ri!speakerRecord['recordType!PMSO Speaker.fields.speakerFolderId']),

    Works like a champ!!!  Thanks again!

Reply
  • Thank you to everyone that responded.  This is how i was able to fix my issue.

    1. I changed the format of the folder field in the database from Text to Integer.

    2. In the process model in the Create Folder smart service where I create the folder for the speaker, I created a custom output. tointeger(ac!NewFolder) and saved that to the folder id field in the speaker record.

    3. In the Interface is set the target to: target: tofolder(ri!speakerRecord['recordType!PMSO Speaker.fields.speakerFolderId']),

    Works like a champ!!!  Thanks again!

Children