Questions and discussion about using ProcessMaker: user interface, running cases & functionality
#814010
Good afternoon,

I am using ProcessMaker 3.1 - Enterprise Version.

I have an order process, in this process, the Dynaform contains a Grid which it has three columns: item_no, item_name, item_quantity. I have no problem to display all of this information for sending an email via ABE function.

However, I have been trying to create a report table where I can view all the order items instantly. For the moment I can only select some variables from a process such as "order_by", "order_time" etc because they are just string type outside the grid. But I don't know how I can get the no,name and quantity from the grid so I can use MySQL to view this reporting table.

Thanks in advance,
Yuan
#814017
I tried to use the following trigger to save the grid into a json string.
//export a grid as a JSON string:
@@clientsListJson = json_encode(@=clientsList);

But when it comes to my report table, the data field in the table is like following, which only returns some parts of the json string, it should be a long string.

Since I need to build an external webpage to display all the items, therefore I need this reporting table as the data table, so is it a good idea to pass the order details into a json string and store in the report table or should I generate another table specific for the order_grid?


Thanks,
Yuan
Attachments
2018-04-12_16-30-51.png
2018-04-12_16-30-51.png (2.94 KiB) Viewed 3334 times
#814034
if you want to see all the contents of the JSON string, then put this in the HTML code of your Output Document's template:
Code: Select all
<textarea>@#clientsListJson</textarea>
You can use JSON to store the entire grid in a single field in your Report Table. In the process designer's graphical interface, create a string variable named "clientsListJson" and then you will be able to include it in your Report Table. For me it is easier to create a separate Grid Report Table, but you can use JSON if you find that easier than having two Report Tables (one for the process and another for the grid).
#814037
amosbatto wrote:if you want to see all the contents of the JSON string, then put this in the HTML code of your Output Document's template:
Code: Select all
<textarea>@#clientsListJson</textarea>
You can use JSON to store the entire grid in a single field in your Report Table. In the process designer's graphical interface, create a string variable named "clientsListJson" and then you will be able to include it in your Report Table. For me, it is easier to create a separate Grid Report Table, but you can use JSON if you find that easier than having two Report Tables (one for the process and another for the grid).

Thanks for your advice Amo, I think it may be easier for me to create another report table, but I have a problem to create another report table. When I select the Grid Type, the variable list and the drop-down for selecting return null, please see my attached screenshot. I have tested this for other processes which work well, only this process doesn't allow me to select grid variable.

Thanks,
Yuan
Attachments
2018-04-13_8-42-41.png
2018-04-13_8-42-41.png (43.15 KiB) Viewed 3322 times

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[…]