Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By Walad100100
#793412
I have a text02 that is populated using SQL. This SQL depends on text01 in its WHERE clause. All works fine.

[1] However, when I click "Next Step" then move back by clicking "Previous Step" the text02 does NOT get populated based on the value in text01. In other words, the SQL seems to be triggered ONLY when text01 is modified by the user only. The SQL is not triggered or executed when moving back and forth between steps (i.e., between forms).

[2] How to disable the Next and Previous links?

[3] Another weird behavior is the following: I added a BEFORE trigger that sets @@text01="AR". The SQL of text02 gets executed. However, when I click Next Step then get back to the same step using Previous Step, the trigger is executed but the SQL is NOT executed!

In the latest versions of PM, the "Next Step" and "Previous Step" links are not mentioned at all, yet, they still appear in the run.

Advise please.
Last edited by Walad100100 on Fri Jun 23, 2017 11:54 am, edited 1 time in total.
User avatar
By amosbatto
#793427
Walad100100 wrote:I have a text02 that is populated using SQL. This SQL depends on text01 in its WHERE clause. All works fine.
[1] However, when I click "Next Step" then move back by clicking "Previous Step" the text02 does NOT get populated based on the value in text01. In other words, the SQL seems to be triggered ONLY when text01 is modified by the user only. The SQL is not triggered or executed when moving back and forth between steps (i.e., between forms).
I just tried it in PM 3.2 (Debian 8.4 with Firefox 51 and Chrome 52) and the SQL always executes when I leave a Dynaform and then return using the Next Step and Previous Step links.

Are you using a dependent field (referencing another field in your SQL query)?.

At any rate, you can force the SQL query by using the executeQuery() method in JavaScript. See: viewtopic.php?f=47&t=710110
If you use this JavaScript code in your DynaForm, then it will execute every time the DynaForm loads.
Code: Select all
var aOptions = getFieldById("selectContacts").executeQuery();
getFieldById("selectContacts").mergeOptions(aOptions);
(change selectContacts to the ID of your dropdown box.

Thanks for the link, amosbatto! I was searching fo[…]

Hello Please can you help me with the place where […]

Hi there, I have 3.5.7, 3.8.1 and 3.8.2 versi[…]

AI bot development involves creating intelligent b[…]