Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: ArturoRobles

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 vahid2231
I have trouble doing this process.
I have two forms, in the first form the information is confirmed or rejected by the manager.
Now in the second form, I want to show the user only the items that have been approved.
Please help me do this. I need a very quick answer.
grid1.JPG (28.05 KiB) Viewed 336 times
grid2.JPG (25.26 KiB) Viewed 336 times
User avatar
By kirkwg
Hi there,

A similar way of doing is shown below, kindly try to rewrite it in order to applying to your grid's case, thanks.
Code: Select all
var grid_1 = [
    ["Yes",5,"Phone"] ];
var grid_2 = [];
var len = grid_1.length;

for (var i=0; i<len; i++){
  if (grid_1[i][0]==="Yes"){
    grid_2.push( [grid_1[i][0], 
      grid_1[i][1], grid_1[i][2]]);      
//output: [["Yes",20,"Table"],["Yes",5,"Phone"]] 

By vahid2231
Thank you for your answer
But unfortunately it did not work
Let me explain again

In this work, a user has a series of information that he must confirm or reject
For example, if there are four rows in the network and two of them are approved
Only these two items should be displayed in the next job
User avatar
By kirkwg
Hi there,

Found an example for you, kindly read the link below:

Reference to/find this JS above mainly to hide a grid row:
Code: Select all
 //subtract 1 from row number because starts counting from zero:
    $("#"+gridId).find("div.pmdynaform-grid-row").eq( rowNo - 1 ).hide();     //i.e. .eq(0) = 1st row, .eq(1) = 2nd row etc.
Other than that you should know the logic how to do, good luck, cheers....

Sometimes the data comes from a user, like when a […]

Found the solution here:[…]

Learn what's new in ProcessMaker 3.6! We are proud[…]

Hello, I have a case that appears both as comple[…]