1

I have a listview with a few fields, two of the fields are firstName, lastName. I would like to display Name as a header and concatenate firstName and lastName.

How can I go about doing this?

Chirdeep Tomar
  • 4,281
  • 8
  • 37
  • 66

1 Answers1

1

Here is the snippet to do so:

var user = nga.entity('Users');
user.listView()
      .fields([
          nga.field('id').label('Name').map(function (value, entry) {
              return entry.firstName + ' ' + entry.lastName;
          })
      ]);
F3L1X79
  • 2,575
  • 2
  • 29
  • 45