Author Topic: Unable to concatenate 2 dataindx fields  (Read 287 times)

afterhours2

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 8
    • View Profile
Unable to concatenate 2 dataindx fields
« on: January 10, 2023, 10:20:42 pm »
Hi,

We are using pro v8.5 in our organisation. I am trying to concatenate 2 fields from Java object to display on the grid, However the below logic is returning empty on the Grid screen. I am trying to concatenate supervisorFirstName and supervisorLastName


{ title: "Supervisor", pq_fn:{dataIndx: 'CONCATENATE(supervisorFirstName,supervisorLastName)'}, minWidth: 100,maxWidth: 400, align: "center"  }

I used the below link as reference: https://paramquery.com/forum/index.php?topic=3821.0

Not sure, if I am missing anything here, any help would be much appreciated.


Thanks,
Syed

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6311
    • View Profile
Re: Unable to concatenate 2 dataindx fields
« Reply #1 on: January 11, 2023, 01:48:59 pm »
Syed

pq_fn is defined in the data, not in the colModel. Example: https://paramquery.com/pro/demos/excel_formula

In your case rowTemplate or js formulas are more suitable.

https://paramquery.com/pro/demos/grid_formula

https://paramquery.com/pro/demos/rowtemplate

Please let me know if you need further assistance.