Author Topic: CONCATENATE formula bug  (Read 2519 times)

vsa

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 12
    • View Profile
CONCATENATE formula bug
« on: September 03, 2020, 04:18:33 pm »
Hello,

Formula has invalid result for a "string" dataType columns with a zero-filled 'number' value.

Example code:

Code: [Select]
   
$(function () {
        var data = [
            {column1: '001', column2: 'AAA', column3: '', pq_fn: { column3: 'CONCATENATE(A1,B1)'} }
];

        var obj = {
            scrollModel: {autoFit: true},           
            colModel: [
                { title: "column1", width: 100, dataType: "string", dataIndx: "column1" },
                { title: "column2", width: 100, dataType: "string", dataIndx: "column2" },
                { title: "column3", width: 100, dataType: "string", dataIndx: "column3" }
            ],
            dataModel: {
                data: data
            }
        };
        $("#grid_row_styles").pqGrid(obj);
    });   

Both source columns are "string" type.
Result is "1AAA" instead of "001AAA".

Thank you in advance.

vsa

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: CONCATENATE formula bug
« Reply #1 on: September 07, 2020, 09:32:52 pm »
In previous version 7.2 this bug does not exist

Live test for 7.3: https://jsfiddle.net/sm34nk5r/1/

You can change version in script link to 7.2 and you will see that in 7.2 it works correctly.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: CONCATENATE formula bug
« Reply #2 on: September 08, 2020, 05:16:27 pm »
Thanks for jsfiddle, it's been corrected in upcoming version
« Last Edit: September 08, 2020, 05:20:37 pm by paramvir »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: CONCATENATE formula bug
« Reply #3 on: September 16, 2020, 03:57:59 pm »
This has been fixed in v7.4