Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#813125
Hello Al,

We have uploaded a file from one case to another case. The file is visible in the uploaded document.
But we need to associate that file into single file control.
Please help us to achieve this.

Regards,
Jenifer
#813127
Are you manually uploading the file from one case to another case or are you using some other method (PMFCopyDocumentCase(), POST POST /cases/{app_uid}/input-document or http://<IP-ADDRESS>/sys<WORKSPACE>/<LANG>/<SKIN>/services/upload)?

After the file upload, you need to update the record for the file in the APP_DOCUMENT table by setting the APP_DOC_FIELDNAME field to the name of the variable associated with the File control. This thread explains the basic idea:
viewtopic.php?t=730024

Tell me how you uploaded the file to the case and if it is associated with an input document or not and I can give a programming example to use.
#813166
Hello Amos,

I am using PMFAddInputDocument() to upload file from one case to another case.
Don't we have any other option to associate the file into variable? Because we are not allowed to update the table right now.

Regards,
Jenifer
#813232
You can associate the uploaded file with a File control by setting the name of the File control to the APP_DOCUMENT.APP_DOC_FIELDNAME field in the database, like this in a trigger:
Code: Select all
@@fileID = PMFAddInputDocument('757584323513f501410f3f3061256214', null, 1, 'INPUT', 'Testing', 'Add',
   @@APPLICATION, @%INDEX, @@TASK, @@USER_LOGGED, 'file', 'c:\file.txt');

if (@@fileID) {
   $d = new AppDocument();
   $aFileInfo = $d->Load(@@fileID);
   $aFileInfo['APP_DOC_FIELDNAME'] = 'contractFile'; //set to the "name" of the File control
   $d->update($aFileInfo);
} 

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]