Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Hi,
I am trying to store the form fields value to database using bean shell. But I am not able to fetch the values. I tried to get the form row using 'FormRow originalRow = rows.get(0);'.
import org.joget.apps.form.model.*;
import org.joget.apps.form.service.*;
import java.sql.*;
import java.util.*;
public FormRowSet test() { Connection con = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/appstudio?useUnicode=true&characterEncoding=UTF-8", "root", "admin"); if(!con.isClosed()){ String query = "select id, name FROM master_country"; PreparedStatement stmt = con.prepareStatement(query); ResultSet rs = stmt.executeQuery(); FormRowSet f = new FormRowSet(); f.setMultiRow(true); while (rs.next())
return f;
}
}
return test();
mentioned in the knowledgebase 'http://dev.joget.org/community/display/KBv4/Store+Form+Field+Data+to+Multiple+Tables. 'But getting error 'undefined variable rows'.
how can I get rows object ?
Please help.
Thanks,
Promod