I have a grid that pulls data from several tables and uses the data to determine the percentage of those in the company and those who have completed the training.
The problem I have is the grid calculates the percentage of the top row and carries that same percentage to all remaining rows.
This is the calculation code I have in a php method which is triggered in the OnRecord event.
$bot_t = {bot_trained};
$str = {strength};
$bot_pr = (($bot_t*100)/$str);
{bot_perc} = $bot_pr;
Am I missing something for it to run for every row in the grid?
The sql queries to pull the "SELECT COUNT(*); runs prior to the execution of this code and it works as intended and is pulling good data. I just can’t get the percentage calculations to work correctly.
What I am getting is the following
Row 1
unit - {strength} - {bot_trained} - {bot_perc}
T1 - 25 - 5 - 25%
T2 - 54 - 3 - 25%
T3 - 108 - 1 - 25%
Thanks.