[SOLVED] Help understanding functions in PHPRunner |
11/4/2011 7:49:21 PM |
PHPRunner General questions | |
W
wildwally author
Ok, I've got a firm grasp on the basis of using queries and getting things to do what i want for the most part - but this last issue has me racking my brain over and over. I think my VBA programing train of thought is blending into the picture which might have things not working like it should.
|
|
C
|
cgphp 11/4/2011 |
Check this article: http://xlinesoft.com/phprunner/docs/how_to_add_external_files.htm |
W
|
wildwally author 11/4/2011 |
Check this article: http://xlinesoft.com...ernal_files.htm
|
C
|
cgphp 11/4/2011 |
$values is the array to access fields values of the add/edit pages. |
W
|
wildwally author 11/4/2011 |
$values is the array to access fields values of the add/edit pages. Is workingDays the real name of a field of the table in the database ? Don't add the getWorkingDays1 function in a PHP snippet. Add it directly into the "Before record update" event or (better) in the "After application initialized" event as you can read in the above link.
include("workdays.php");
$values['workingDays'] = getWorkingDays($values,$startDate,$endDate,$holidays); |
W
|
wildwally author 11/4/2011 |
Thanks for your guidance - got it working. |
C
|
cgphp 11/4/2011 |
Add the include statement to the "After table initialized" event (as explained in the above link). Call the getWorkingDays function with: $values['workingDays'] = getWorkingDays($values['startDate'],$values['endDate'],$values['holidays']); |