Hi,
I have some data in my DB which contains spaces in between, but when I am trying to display same data using a!gridTextColumn that data is getting trimmed.
For e.g. I have data as "abc *** 89" in DB but when I am displaying on form it is getting displayed as "abc *** 89"
I am not using trim function anywhere while displaying data.
Any suggestions to handle the above scenario.
Thanks in advance.
Regards,
Trunal Jain (TJ)
Discussion posts and replies are publicly visible
hi
i have fetched the same value with query entity and the then i have displayed using a!gridTextColumn() in a!gridField(),it is showing the same which is in DB,
take one test rule,cal you query entity in that,by using index function fetch your particular column which you have spaces,see whether it have spaces or not..
Please find following :
DB table with values :
Code snippet :
load( local!pagingInfo : a!pagingInfo( 1, -1 ), local!datasubset : a!queryEntity( entity : cons!TEST_EMP_DS, query : a!query( pagingInfo : local!pagingInfo )),a!formLayout( firstColumnContents : { a!gridField( label : "Grid Field", totalCount : local!datasubset.totalCount, columns : { a!gridTextColumn( label : "ID", field : "id", data : index( local!datasubset.data, "id", {} ) ), a!gridTextColumn( label : "Names", field : "ename", data : index( local!datasubset.data, "ename", {} ) ) }, value : local!pagingInfo ) })
)
Output :
In the above screenshot you can see there is only one space left between words but in DB there are many spaces.
hi TJ
i have tested it,its working fine for me,i have replaced with my entity in your code...
load(
local!pagingInfo: a!pagingInfo(
1,
-1
),
local!datasubset: a!queryEntity(
entity: cons!Test_Details,
query: a!query(
pagingInfo: a!pagingInfo(
a!formLayout(
label: "",
contents: a!columnsLayout(
columns: a!columnLayout(
contents: {
a!gridField(
label: "Grid Field" & local!datasubset.data.name,
totalCount: local!datasubset.totalCount,
columns: {
a!gridTextColumn(
label: "iD",
field: "id",
data:
index(
local!datasubset.data,
"id",
{}
label: "Names",
field: "name",
data: index(
"name",
},
value: local!pagingInfo,
saveInto: local!pagingInfo
}
which DB you are using?
We are using MSSql and I suppose you are working on 17.2. Currently I am working on 17.1