“Filter”, filters the data based on the conditional statement provided.
- To know, how to write conditional expression click here
- To understand various expressions used click here
Let us understand through an example,
Suppose, to filter only ‘Unified Social’ entries in meeting details table for user having role ROLE_USER
-
- Select the table meeting_details
- Select conditionIf execution type
- Apply Condition
check(“${role}”,”ROLE_USER”)
// checks whether role is assigned with "ROLE_USER" or not
-
- Apply filter statement
meeting_details.client_name ='Unified Social'
Similarly, conditional and filter statement can be written using groovy scripts
-
groovy script :
condition :
import com.helical.efw.efwcomponents.metadata.GroovyUsersSession;
def evalCondition(){
String userRole = GroovyUsersSession.getValue('${role}.name');
if(userRole.contains('ROLE_USER')){
return true
}else{
return false
}
}
Filter :
def evalFilter(){
return “meeting_details.client_name ='Unified Social'”
}