How to duplicate file upload recently

Confluence User - 19 Nov, 2019

I am using bean shell to duplicate data as below. But it only copy the data from field not the file that upload by applicant. How to duplicate/load the file that upload by the applicant before since it only duplicate the text.


import org.joget.apps.form.model.Form;
import org.joget.apps.form.model.Element;
import org.joget.apps.form.model.FormData;
import org.joget.apps.form.model.FormRow;
import org.joget.apps.form.model.FormRowSet;
import org.joget.commons.util.LogUtil;
import org.joget.apps.form.lib.WorkflowFormBinder;

public FormRowSet loadData() {
FormRowSet rows = null;

WorkflowFormBinder binder = new WorkflowFormBinder();

String duplicateId = "#requestParam.duplicate_id#";
if (!duplicateId.isEmpty() && !duplicateId.contains("requestParam.")) {
rows = binder.load(element, duplicateId, formData);
FormRow row = rows.get(0);
row.setId(null);
row.remove("reference_id");
} else {
rows = binder.load(element, primaryKey, formData);
}

return rows;
}

return loadData();

datalists;database;forms

1


19 Nov, 2019
confluenceUser
confluenceUser

Hi,

attached is a link that might help you:

File handling in Bean Shell Form Store Binder

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print