Joget DX Available for Download

Check out Joget DX, the next generation successor to Joget Workflow for faster, simpler digital transformation.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
import org.joget.apps.form.model.*;
import org.joget.apps.form.service.*;
import java.sql.*;
import java.util.*;
import javax.sql.*;

FormRowSet f = new FormRowSet();

//Get Joget's current datasource configs
DataSource ds = (DataSource) AppUtil.getApplicationContext().getBean("setupDataSource");

con = ds.getConnection();

if (!con.isClosed()) {
	//Get the URL parameter
	String recordId = "";
	//Here you can query from one or multiple tables using JOIN etc
	String sql = "SELECT * FROM your_table_name WHERE id=?";
	PreparedStatement stmt = con.prepareStatement(sql);
	stmt.setString(1, recordId);
	//Execute the SELECT SQL statement
	ResultSet rs = stmt.executeQuery();
	//Get value from columns of record(s)
	while ( {
		FormRow r1 = new FormRow();
		r1.put("gridColumn1", rs.getString(1));
		r1.put("gridColumn2", rs.getString(2));
		r1.put("gridColumn3", rs.getString(3));
return f;

Store Binder -> Bean Shell Form Binder