We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Alias field in select?

   var chartData = _DataManager.executeLocal(new ej.data.Query()
                .where('group.dnis.length', 'equal', 12)
                .select(['group.DNIS_Campaign', 'flattenedMetrics.nOffered_count', 'flattenedMetrics.tIvr_count', 'flattenedMetrics.tAnswered_count'])
                .sortBy('group.DNIS_Campaign')
            );

is there a way to map or alias a field to a new name? 

Something akin to

 .select(['group.DNIS_Campaign as DNIS_Campaign', 'flattenedMetrics.nOffered_count as nOffered_count', 'flattenedMetrics.tIvr_count as tIvr_count', 'flattenedMetrics.tAnswered_count as tAnswered_count'])

1 Reply

BP Baby Palanidurai Syncfusion Team May 3, 2019 08:36 AM UTC

Hi Christopher, 

Greetings from Syncfusion. 

We have analyzed your query. You have mentioned how to map the selected fields to new name. but we are not clear about your query, whether you want to map the selected fields to add the new series and map the property to the dataSource?. We are aware of your exact scenario  about the selected to map. Kindly provide the clear details about your requirement which will be helpful in furthermore analysis and provide you the solution sooner. 

Regards, 
Baby. 


Loader.
Up arrow icon