c15f13dec1517e0314dbc84720749e30ffda48a9
FAQ/izenda-and-udfs.md
| ... | ... | @@ -10,7 +10,7 @@ How do I utilize a complex UDF from my database within Izenda? |
| 10 | 10 | |
| 11 | 11 | Here is a step-by-step tutorial on how to use UDFs from your database in Izenda. |
| 12 | 12 | |
| 13 | -**1)** Create the UDF in the database that performs your calculation: |
|
| 13 | +**1.** Create the UDF in the database that performs your calculation: |
|
| 14 | 14 | |
| 15 | 15 | **EXAMPLE UDF:** |
| 16 | 16 | |
| ... | ... | @@ -35,17 +35,19 @@ begin |
| 35 | 35 | end; |
| 36 | 36 | ``` |
| 37 | 37 | |
| 38 | -**2)** Add this function to your [[CustomAdHocConfig|http://wiki.izenda.us/Integration/Tutorials/Customizing-Izenda-Settings]]: |
|
| 38 | +**2.** Add this function to your [[CustomAdHocConfig|http://wiki.izenda.us/Integration/Tutorials/Customizing-Izenda-Settings]]: |
|
| 39 | 39 | ``AdHocSettings.ExtendedFunctions = new string[] { "[dbo].[SafeDivide]" };`` |
| 40 | 40 | |
| 41 | -**3a) You can now choose this function in the 'Fields' tab function drop down for any column. (Functions, as the one above, with more than one input parameter cannot be chosen for a single column in the functions drop-down and must be implemented as an expression.)** |
|
| 41 | +**3a.** You can now choose this function in the 'Fields' tab function drop down for any column. (Functions, as the one above, with more than one input parameter cannot be chosen for a single column in the functions drop-down and must be implemented as an expression.) |
|
| 42 | 42 | |
| 43 | 43 |  |
| 44 | 44 | |
| 45 | -**3b) You can also use this function in the [[Expression|http://wiki.izenda.us/FAQ/UserGuides/15.0-Expressions-in-Izenda]] box on the 'Fields' tab's [[advanced panel|http://wiki.izenda.us/FAQ/advanced-field-settings]]** |
|
| 45 | +**3b.** You can also use this function in the [[Expression|http://wiki.izenda.us/FAQ/UserGuides/15.0-Expressions-in-Izenda]] box on the 'Fields' tab's [[advanced panel|http://wiki.izenda.us/FAQ/advanced-field-settings]]. |
|
| 46 | + |
|
| 46 | 47 | ```sql |
| 47 | 48 | SafeDivide([UnitsOnOrder], [UnitsInStock]) |
| 48 | 49 | ``` |
| 50 | + |
|
| 49 | 51 | You can also use the Format dropdown to turn the result into your desired format. See the result below for what happens when we use the above expression in our Northwind Traders DataSource. |
| 50 | 52 | |
| 51 | 53 |  |
| ... | ... | \ No newline at end of file |