Page 1 of 1

Chart selection Criteria

Posted: Thu Sep 13, 2018 10:59 am
by FoxBill
I am trying to fill in a chart with multiple records per each account. I want the chart to only display the records for the selected account. I am trying to use the selection criteria properties on the chart. I wonder if my syntax is not correct. I am trying to link to account by getting a value from the screen. I tried variations of the following logic:



TSACCT = (getElementValue('I_2_15'))

Re: Chart selection Criteria

Posted: Thu Sep 13, 2018 1:33 pm
by Emily
Hi FoxBill,

You should be able to accomplish this by using the 'selection criteria' and 'parameter value' properties for your chart. There's more information on using these properties in our Charts documentation: http://www.profoundlogic.com/docs/displ ... sionCharts (under Database-Driven Chart).

The 'selection criteria' property acts as the WHERE clause of your SQL statement. If you wanted your chart to populate with only the records for a specific account and the account value is on your screen, you could do something like this:
example.png
example.png (3.68 KiB) Viewed 1621 times
This uses the get() API to get the value of the field with the I_2_15 id and will show the records where TSACCT equals the value of this field.

I hope that this helps!

Re: Chart selection Criteria

Posted: Thu Sep 13, 2018 2:43 pm
by FoxBill
Thanks Emily,
That is exactly what I was looking for that worked fine.

Bill