Hi,

I am able to do the charts with aggregates.

Due to the union requirement,  I have created a server action logic with SQL as follows:

SyntaxEditor Code Snippet

SELECT 'Expense',SUM(Amount) FROM {Expenses}
UNION
SELECT 'Payment',SUM(Amount) FROM {Payments};

The test results also provides the values as expected.  

I did the above activities in the back office.

From the mobile module I have imported the dependencies too.

Now I am not sure about with how to use the server action and structure into the charts and produce the pie. 

I would appreciate if you guys can share any example of using SQL for charts.

Regards

Nathan

Hi,

First right click on the screen and select "Fetch Data from Other Sources", add the the server action and structure from back office as dependency and call the created server action (from screen below replace the sql1 with server action) in there and assign the output 

Drag the pie chart to screen and configure like below.


Regard.

Prasad Rao wrote:

Hi,

First right click on the screen and select "Fetch Data from Other Sources", add the the server action and structure from back office as dependency and call the created server action (from screen below replace the sql1 with server action) in there and assign the output 

Drag the pie chart to screen and configure like below.


Regard.

Thank you very much. It works.