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.
By jonshanley
#816242
Help needed with a dependent query function in Processmaker 3.2.3.

Trying to run a dependant query between a dropdown box and a text box- this works fine in a subform but doesnt when embedded into the dynaform

Following error is observed as JSON response

HTTP Params
JSON
app_uid null
del_index null
dyn_uid 1019897465ba360f2df6808063266852
field_id db_temp_size
parameter_template 1

HTTP Response

<br />
<b>Notice</b>: Undefined property: stdClass::$items in <b>C:\opt\processmaker\workflow\engine\classes\PmDynaform.php</b> on line <b>1627</b><br />
<br />
<b>Notice</b>: Trying to get property of non-object in <b>C:\opt\processmaker\workflow\engine\classes\PmDynaform.php</b> on line <b>1627</b><br />
[{"value":"50","text":"1"}]
#816244
It is hard to understand what you did without seeing the forms.
Can you export your DynaForm and post the .json file for both the subform and the master form?

If the dependent query works in the form, it should work when embedded in another form. Also, what version of PM are you using?
#816255
Thanks so much for your help on this- please find attached the dynaform (Oracle DB RequesT) where the sub form is embedded (and it doesnt work) and also the subform (DB Specification) on its own where it does

Version is ProcessMaker 3.2.3 community edition

Thanks
Attachments
(70.72 KiB) Downloaded 240 times
(17.36 KiB) Downloaded 237 times
#816357
Any updates on this one please?

If it helps- It seems to be difficult to get any dependant queries working between two combo boxes.. if any more examples can be given of how to do this (over and above the documentation) that would be helpful as I can just refactor the process
#822693
I can confirm this problem is reproducible.
Steps to reproduce it:
1. Create a new dynaform and add 4 controls (1 independent auto complete and 3 dependent dropdown)
2. Populate the SQL for the 3 drop down controls to populate based on the value from the auto complete control.
3. Test it in preview mode by modifying the value in the auto complete control, it should work just fine.
4. Create a new dynaform, and add the first dynaform as a subform.
5. Test it in preview mode, it should work just fine.
6. Create a real case, and try testing it again. Only 2 of the dependent controls will refresh.
#822713
Richvle,
I just tried it in PM 3.3.0 Community (in Debian 9.5 with Firefox 52) and I can't replicate the problem.
Here is the process I used:
(34.01 KiB) Downloaded 242 times
Do you see the problem in my process on your installation of ProcessMaker?
Are you using an external database for you dependent field queries? If so, which type of database and what version?

If you open your web browser's debugger (press F12 on most browsers) and go to "Console" or "Network" do you see any errors?
#822716
Hi Amos,
I found the cause in mine. I removed the subform from my main form, and then added the subform back into my main form. It looks like when I made changes to the SQL on the control on the subform, it wasn't refreshing properly to the main form.
amosbatto wrote: Fri Feb 01, 2019 9:20 pm Richvle,
I just tried it in PM 3.3.0 Community (in Debian 9.5 with Firefox 52) and I can't replicate the problem.
Here is the process I used:
Test_dependent_fields_in_subforms-1.pmx

Do you see the problem in my process on your installation of ProcessMaker?
Are you using an external database for you dependent field queries? If so, which type of database and what version?

If you open your web browser's debugger (press F12 on most browsers) and go to "Console" or "Network" do you see any errors?

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]

What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]