Joget Workflow v6 Released

Check out the latest Joget Workflow v6 for many new features and improvements in user experience (UX), app maintainability and performance.

Skip to end of metadata
Go to start of metadata

In this article, we are going to use Bean Shell code to populate our grid with a custom order and filter out some unwanted data. There are 2 ways to achieve this.

1. Using FormDataDao to retrieve data

FormDataDao is a service class to dealing with form data. We will be using the find method to retrieve data and using the sort parameter to sort the data. We can use the condition & params parameters to filter it as well.

public org.joget.apps.form.model.FormRowSet find(java.lang.String formDefId, java.lang.String tableName, final java.lang.String condition, final java.lang.Object[] params, final java.lang.String sort, final java.lang.Boolean desc, final java.lang.Integer start, final java.lang.Integer rows)

Sample Code:


2. Post Processing the Data

In this method, we will reuse the multirow form binder to retrieve the data then do some post processing to sort or filter it before return the data to the grid.


The sample app for this article: APP_custom_grid_load-1-20151119111806.jwa

  • No labels