Ask questions about installing and configuring ProcessMaker 3

Moderator: amosbatto

#825600
Hi,

We want to show data in grid when we upload the pdf file which is stored in one location.
file name and Case Title (case number) both are same.
First upload the pdf file then all data shows in grid . example Case Title, Senders Ref. No. , BICCode
I have attached the image
Attachments
Grid.PNG
Grid.PNG (13.3 KiB) Viewed 240 times
#825732
Hi,

One more question,
When I click on "+ new", If I upload the duplicate file then I want to popup message like "file is duplicate" on click on submit button & also want to delete this file.

&

As previous Reply,
When I upload the file, File name stored in "app_document" and Case Title stored in "app_cache_view" which I want to show in the Grid.
The "File name" & "Case Title" both are same "name" which I want to show in the Grid.

Please Help
Thank You
#825785
amithatle123 wrote: Thu Aug 01, 2019 9:26 am One more question,
When I click on "+ new", If I upload the duplicate file then I want to popup message like "file is duplicate" on click on submit button & also want to delete this file.
You can use this JavaScript code in the example Dynaform that I gave you:
Code: Select all
//change to the ID of the grid:
var gridId = "productsList";
//set to ID of the File field in grid:
var gridFileId = 'productFile';

var reFileInGrid = new RegExp("^\\["+gridId+"\\]\\[(\\d+)\\]\\["+gridFileId+"\\]$");
var formId = $("form").prop("id");

$("#"+formId).setOnchange( function(fieldId, filename, oldValue) {
  var aMatch = fieldId.match(reFileInGrid);
  
  //if the "productFile" field was changed in the "productsList" grid:
  if (aMatch) {
    var rowNo = aMatch[1];
    var basename = filename;
    
    if (filename.lastIndexOf(".") != -1) {       
      basename = filename.substring(0, filename.lastIndexOf("."));
    }
    
    //Search for duplicate filenames that have been uploaded in the same grid.
    //If a duplicate is found, then delete this file and display an alert message 
    //to the user saying that duplicate filenames are not allowed.
    var oGrid = $("#"+gridId);
    var nRows = oGrid.getNumberRows();
    
    
    for (var i = 1; i <= nRows; i++) {
      var fileFieldId = "form["+gridId+"]["+i+"]["+gridFileId+"]";
      var oFileButton = $("[id='"+fileFieldId+"']").parent().find("button");
      var filenameInRow = oFileButton.text();
     
      if (i != rowNo && filenameInRow != '' && filename == filenameInRow) {
        alert("The file '"+filename+"' has already been uploaded in row "+i+".\n"+
              "Duplicate files are not allowed.");
        
        //remove filename from File's button:
    	$("[id='"+"form"+fieldId+"']").parent().find("button").text("Allowed file extensions: *"); 
    	$("[id='"+"form"+fieldId+"']").val('');       //clear hidden file input field
    	$("[id='"+"form"+fieldId+"_label']").val(''); //clear filename in hidden text field
      }
    }
    
    //set the file's basename in the "productName" field for the same grid row:
    $("#productsList").setValue(basename, rowNo, 1);
    
  } 
});

Hi, I want to have some of my workflows to be avai[…]

Hi Support, I think this is good. I too have fixe[…]

Hi, I'm facing the same error and when I run : […]

Routing Logic

Hi All I am doing a process, where i have 3 tasks […]