Distribution of values Behind code | Community
Skip to main content
kapilKochar
Level 6
March 10, 2021
Question

Distribution of values Behind code

  • March 10, 2021
  • 2 replies
  • 1946 views

Hi Everyone, 

Can someone please help me to understand from where I can find the code/logic behind "Distribution of values" option we have in query activity

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

akashaj7696
Level 3
March 10, 2021

Hi Kapil,

This are usually all created using Input forms. You can find the code behind that in there. Go from Administration > Configuration > Input forms and search for Distribution of values form.

Thanks,

kapilKochar
Level 6
March 10, 2021
I checked that already but that form does not explain how grid is coming up on click of this button and how values are getting calculated
Manoj_Kumar
Community Advisor
Community Advisor
March 10, 2021

Hello @kapilkochar 

 

In the backend the query is using GroupBy in the queryDef.

 

You can achieve the same result by adding groupBy attribute in your queryDef code.

 

Here is the same code:

   select: {node:[
      {alias: '@expr', expr: field, groupBy: 'true', noSqlBind: 'true'},
      {alias: '@count', expr: 'COUNT()', label: 'Count'},
    ]},

Let me know if that helps.

 

Manoj     Find me on LinkedIn
Manoj_Kumar
Community Advisor
Community Advisor
March 10, 2021