Data getting trimmed in gridField

 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

Parents
  • 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.

  • 0
    A Score Level 1
    in reply to TJ

    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(

           1,

           -1

         )

       )

     ),

     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",

                       {}

                     )

                 ),

                 a!gridTextColumn(

                   label: "Names",

                   field: "name",

                   data: index(

                     local!datasubset.data,

                     "name",

                     {}

                   )

                 )

               },

               value: local!pagingInfo,

               saveInto: local!pagingInfo

             )

           }

         )

       )

     )

    )

     

     

    which DB you are using?

Reply
  • 0
    A Score Level 1
    in reply to TJ

    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(

           1,

           -1

         )

       )

     ),

     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",

                       {}

                     )

                 ),

                 a!gridTextColumn(

                   label: "Names",

                   field: "name",

                   data: index(

                     local!datasubset.data,

                     "name",

                     {}

                   )

                 )

               },

               value: local!pagingInfo,

               saveInto: local!pagingInfo

             )

           }

         )

       )

     )

    )

     

     

    which DB you are using?

Children