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.
#827055
Hello,

I try to populate a text field (@@EMAIL_DA1) with an email address for a database using executeQuery in a trigger.

Here is the code I try to execute in a trigger:

$DB = '3180815915aaa5b6b2f1962098817046';
$CODEUO = @@LD_UO; // LD_UO is a Dynaform variable containing a unique key
$query1 = "select distinct UtilisateurTitulaire_Email from V_REF_ELEMENTORGANISATION where ElementOrganisation_CodeElementOrganisation = '$CODEUO'";
$result1 = executeQuery($query1, $DB);
@@EMAIL_DA1 = $result1;

Unfortunately, I obtain [object Object] result instead of an unique email address.

Could you help me to obtain the correct result ?

Thank you for advance !
#827072
Hi,
Please change your code like this:
Code: Select all
$DB = '3180815915aaa5b6b2f1962098817046';
$CODEUO = @@LD_UO; // LD_UO is a Dynaform variable containing a unique key
$query1 = "select distinct UtilisateurTitulaire_Email from V_REF_ELEMENTORGANISATION where ElementOrganisation_CodeElementOrganisation = '$CODEUO'";
$result1 = executeQuery($query1, $DB);
@@EMAIL_DA1 = $result1[1]['UtilisateurTitulaire_Email'];
https://pmlearning.info
Thanks
Last edited by programerboy on Wed Apr 07, 2021 1:25 am, edited 1 time in total.

Being the best in the started business is the obje[…]

Winzo is a popular and unique game on the mobile p[…]

Cannot create process using templets

Real details. The problem was solved by effect!

However, it is essential to use it responsibly and[…]