Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  1. English
    Choose Bean Shell Form Data Store as the Form's Store Data Store.
  2. Key in the following code.

    Code Block
    import org.joget.apps.app.service.AppUtil;
    import org.joget.apps.form.model.Element;
    import org.joget.apps.form.model.FormRowSet;
    import org.joget.apps.form.model.FormData;
    import org.joget.apps.form.lib.WorkflowFormBinder;
    import org.joget.commons.util.LogUtil;
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.sql.DataSource;
    
    rows.get(0).setProperty("field2", rows.get(0).getProperty("field1"));
    
    new WorkflowFormBinder().store(element, rows, formData);

    In the code above, it will copy the value from form element with id "field1" into "field2".

  3. Save the form.


Sample App

View file
nameAPP_kb_dx8_copyValue.jwa
height250