Page 1 of 1

Hash Variable Parameter for PHP Procedure

Posted: Wed Jul 29, 2015 2:49 pm
by vario
I am struggling to get this to work!
I have a browse form based on my "employee" table.
The edit form has a subform and one display field showing the value CONCAT(emp_surname,', ',emp_forename) on one tab, and on another tab there is an iframe containing a Google graph.
I want to set two hash variables in the edit form containing arbitrary dates as parameters for the Google graph, but cannot get them to be picked up by the PHP code generating the graph. I have tried creating display fields, using nuSetHash, selecting the dates with the browse SQL but no luck.
Can you help?

Re: Hash Variable Parameter for PHP Procedure

Posted: Thu Jul 30, 2015 4:28 am
by admin
vario,

Are you changing the dates after the graph is displayed?

Steven

Re: Hash Variable Parameter for PHP Procedure

Posted: Thu Jul 30, 2015 7:47 am
by vario
Yes, that was my plan - the user would be able to redraw the graph according to their choice of dates. It is displayed initially with a preset date range. I have looked at the example attached to the wiki entry for iframes which suggests this sort of thing is possible but (being a novice) can't quite adapt it to my needs.

Re: Hash Variable Parameter for PHP Procedure

Posted: Wed Aug 12, 2015 1:34 am
by admin
vario,

Is it an iFrame created here ?
Capture.PNG
If it is try using

nuRunPHP()

http://wiki.nubuilder.net/index.php/Jav ... C_id.5D.29



Steven

Re: Hash Variable Parameter for PHP Procedure

Posted: Wed Aug 12, 2015 9:20 pm
by vario
Steven,

It is an iframe form object which runs a PHP procedure creating the Google chart. I want to use #from_date# and #to_date# within the procedure. It works if I run the code via "Run Procedure" with a form having the two dates as fields, but not if the two dates are on the edit form with the iframe. Perhaps the iframe cannot see the edit form fields?

Neil.

Re: Hash Variable Parameter for PHP Procedure

Posted: Thu Aug 13, 2015 2:31 am
by admin
Neil,

use nuDebug() to see what values #from_date# and #to_date# give you.

Steven