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.
#825411
Hi,

I write a trigger before my form:
Code: Select all
//This is exist in my server and my database
$aFileVar = array ( 
	'appDocUid' => '4451428635d2af3e2734131096936236',
	'name' => 'test.pdf',
	'version' => 1
);

//This work
//for multiple file type
@=multipleFileVar005 = array();
@=multipleFileVar005[0] = $aFileVar;

//This don't work!
//for single file type
@@fileVar003 = json_encode(array($aFileVar['appDocUid']));
@@fileVar003_label = json_encode(array($aFileVar['name']));
when I use thie trigger in before my form, the multiple file is correct and get data, but the file field don't show download link in the form.

How can I set data and download link for file field in my form with trigger.

Thnaks
#825433
You need to set the "name" of the File field in the APP_DOCUMENT.APP_DOC_FIELDNAME field in the database in order for the file to appear in the File field.
See:
https://wiki.processmaker.com/3.0/File_ ... se_storage

Add this to your trigger code:
Code: Select all
$sql = "UPDATE APP_DOCUMENT SET APP_DOC_FIELDNAME='fileVar003' WHERE 
   APP_DOC_UID='4451428635d2af3e2734131096936236' AND DOC_VERSION=1";
executeQuery($sql);

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]