1
0
-1

Hi, i want to make my data in datalist look beatiful. i want my multiple data become new line.

 

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hey there! 

      You can use this Datalist Column Formatter to beautify the multi-value column: Bean Shell Formatter

      There are few sample scripts in the guide on how to retrieve the values. You can write simple Java to append new line "/n" after every string in your desired format.

      Hope this helps! 

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hey justin,

         

        Thank you. it really help me. i edit the java script to made a simple changes to my format. This is my script:

         

        //import the necessary classes
        import org.joget.apps.datalist.service.DataListService;
        import org.joget.apps.app.service.AppUtil;

        DataListService dataListService = (DataListService) AppUtil.getApplicationContext().getBean("dataListService");

        //since this entire bean shell applies to every row, "row" is automatically iterated here.
        //"name" is the column id
        String value = dataListService.evaluateColumnValueFromRow(row, "jan");

        return value.replaceAll(";", "\n");

          CommentAdd your comment...