How can i beautify my data in datalist?

Confluence User - 24 Sep, 2018

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

 

datalists

2


25 Sep, 2018
confluenceUser
1
confluenceUser

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! 

25 Sep, 2018
confluenceUser
confluenceUser

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");

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print