1
0
-1

i currently try used #currentUser.groups.name# but when i used it is show all assign group for that user for example when i use console log the show is  "namegroup1 , namegroup2". so is possible to get only 1 group name by index or something ? 

    CommentAdd your comment...

    1 answer

    1.  
      3
      2
      1

      import org.joget.commons.util.*;

      String userGroups = "#currentUser.groups.name#"; 
      LogUtil.info("received groups for current user " , userGroups);

      String[] userGroupsArray = userGroups.split(";"); 
      String group2 = userGroupsArray[1]; 

      return group2;



      Maybe you can try a beanshell script to get the group you want. How to develop a Bean Shell Hash Variable


        CommentAdd your comment...