Hash Variables: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
There are 4 places Hash Variables can be used.. | There are 4 places Hash Variables can be used.. | ||
==PHP== | ==PHP== | ||
Hash Variables allow you to customise your [[Procedures|PHP code]]. | |||
Before running any custom PHP code, nuBuilder does a search and replace with all currently available Hash Variables and any used in your code. | |||
To find what Hash Variables are available you can use [[PHP#nuHash|nuHash()]]. | |||
Example of using Hash Variables in PHP. | |||
<source lang="php"> | <source lang="php"> | ||
Line 21: | Line 21: | ||
==HTML== | ==HTML== | ||
Hash Variables allow you to customise your HTML [[Objects]]. | |||
The Hash Variables available to HTML Objects are the same as those available on '''Before Edit'''. | |||
Example of using Hash Variables in HTML. | |||
<source lang="html"> | <source lang="html"> | ||
Line 39: | Line 39: | ||
==Custom SQL== | ==Custom SQL== | ||
All Custom SQL used in nuBuilder Forte. | All Custom SQL used in nuBuilder Forte. | ||
<source lang="sql"> | |||
CREATE TABLE #TABLE_ID# SELECT * FROM customer; | |||
</source> | |||
==Report Labels== | ==Report Labels== | ||
Using Hash Variables allows you to have changing titles on [[Report_Designer#Object_Properties|Report Labels]]. | |||
Example of using Hash Variables in a Report Label. | |||
<source lang="html"> | <source lang="html"> | ||
Revision as of 02:18, 16 July 2017
There are 4 places Hash Variables can be used..
PHP
Hash Variables allow you to customise your PHP code.
Before running any custom PHP code, nuBuilder does a search and replace with all currently available Hash Variables and any used in your code.
To find what Hash Variables are available you can use nuHash().
Example of using Hash Variables in PHP. <source lang="php">
$s = "CREATE TABLE #TABLE_ID# SELECT * FROM invoice";
nuRunQuery($s);
</source>
HTML
Hash Variables allow you to customise your HTML Objects.
The Hash Variables available to HTML Objects are the same as those available on Before Edit.
Example of using Hash Variables in HTML. <source lang="html">
<iframe
width="560" height="315" src="#cus_youtube#" frameborder="0" allowfullscreen>
</iframe>
</source>
Custom SQL
All Custom SQL used in nuBuilder Forte. <source lang="sql">
CREATE TABLE #TABLE_ID# SELECT * FROM customer;
</source>
Report Labels
Using Hash Variables allows you to have changing titles on Report Labels.
Example of using Hash Variables in a Report Label. <source lang="html">
Sales Between #from_date# And #to_date#
</source>