Count instances of enumerations

0
I was wondering how to set up a microflow so that instances of each enumeration can be counted and stored in one integer attribute that could be later used to graph the count against each enumeration. For example, if the enumeration inputs were “low”, “medium”, and “high” with 3, 5, and 7 instances respectively, is there a way I get the count for all enumerations without having to create a loop that checks each enumeration specifically?
asked
1 answers
2

You can do so using oql. if the attribute of type Enumeration is called MySize the OQL will be 

SELECT COUNT(*) as _Sum, MySize 

FROM YourModulename.MyTable 

GROUP BY MySize

Try out this OQL by clicking in the ProjectExplorer→Add Other→Dataset. Sourcetype OQL.

To call this OQL from a microflow import the  AppStoreApp “OQL". See this shared microflow.

The result will be 

3, Low;
5, Medium;
7, High;

 

answered