Good Morning
I try to calculate the folllwoiung in a grid (placed this code in onRecord)
{event_density} = {reg_p} / {min_p}
But it is not working , the grid is not displayed. Nothing is displayed.
the type of event_density is percentage the two others are integer
reg_p is a “manual field” and loaded from an other tabele
SELECT count(participant_id) FROM bpmspace_edums.participation
WHERE event_id = {event_id} AND`status_participation_id` != 6
ORDER BY participant_id
min_p is also a “manual field”
SELECT min_participants
FROM course
WHERE course_id = {course_id}
ORDER BY min_participants
do i have to use
$sql = ‘SELECT …’;
sc_lookup(tbl_lookup,$sql);
{calc_value} = tbl_lookup[0][0];
Use onInit to get values before form fields are populated. Use onLoad if you need to access existing form field values.
as explained here http://www.scriptcase.net/forum/showthread.php?582-Calculated-Fileds
that would be double work since the sql statement is allready in the filed definition- and they are working
thanks rob