Trying to implement counter function for displaying number of records in custom component's ServerJS file
following Code is prepared:-
* @return {QBResult}
*/
var query = parentFoundset.getQuery();
parentFoundset.loadRecords(query);
console.log(query);
/** @type {QBResult} */
query.result.addPk().add(query.columns.article_id.count);
query.groupBy.addPk().add(query.columns.article_id);
// query.columns.articlestatus_id.count;
but returning Error:-
ERROR com.servoy.j2db.util.Debug - select top 201 article_id, article_id, count(article_id) from article group by article_id , article_id order by article_id asc parameters: <null>
ERROR org.sablo.websocket.WebsocketEndpoint - Error: Wrapped com.servoy.j2db.dataprocessing.DataException: Unknown errorCode 100
Ambiguous column name 'article_id'. (C:\Users\shivdev.panchal\servoy_workspace\components1\gt\gt_server.js#38)
Any suggestion on writing a proper query