Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By heemalkumar
#813757
Hi Team,
There is two requests I need help with:

1 - In the first Task I have a Grid named as Grid1. In the second Task, I have another Grid as Grid2. I have a trigger which copies most of the columns from Grid1 to Grid2 by itself. a Column in Grid2 is named as Case Number. How do I add a trigger so that the Case Number of this Form is auto populated in the txt field in Grid2.

2 - In Grid1, I have a Dropdown as Vendor. I want this Vendor name to show in my Case Label. I cant find anything where a field from a Grid can be added onto the Case Label.

Many Thanks and await.
User avatar
By amosbatto
#813770
heemalkumar wrote:Hi Team,
1 - In the first Task I have a Grid named as Grid1. In the second Task, I have another Grid as Grid2. I have a trigger which copies most of the columns from Grid1 to Grid2 by itself. a Column in Grid2 is named as Case Number. How do I add a trigger so that the Case Number of this Form is auto populated in the txt field in Grid2.
What version of PM are you using?
In the DynaForm where you display Grid2, add a text field with the ID "caseId" in your Grid2. Then, in your trigger to populate Grid2, use code like this:
Code: Select all
if (isset(@=Grid1) and is_array(@=Grid1)) {
   @=Grid2 = array();
   for ($i = 1; $i <=count(@=Grid1); $i++) {
      @=Grid2[$i] = array(
          "field1" => @=Grid1[$i]['field1'],
          "field2" => @=Grid1[$i]['field2'],
          "caseId" => @@APP_NUMBER
     );
   }
} 
heemalkumar wrote:2 - In Grid1, I have a Dropdown as Vendor. I want this Vendor name to show in my Case Label. I cant find anything where a field from a Grid can be added onto the Case Label.
Add a trigger after your DynaForm which contains Grid1 like this:
Code: Select all
@@vendorLabel = '';
if (isset(@=Grid1) and is_array(@=Grid1) and count(@=Grid1) >= 1) {
   @@vendorLabel = @=Grid1[1]['vendor_label'];
}
 
Where the ID of the dropdown in Grid1 is "vendor".

Then, right click on the task, go to Properties in the context menu, then go to Case Labels in the dialog box. Enter @#vendorLabel in the Title.

Web3 development encompasses creating decentralize[…]

The Upland Clone Script, offered by Dappsfirm, rep[…]

Dappsfirm offers a bet365 clone script that mirror[…]

🚀 Tauchen Sie mit Immediate Alora AI in die Welt d[…]