FAQ/fixed-unit-conversions.md
... ...
@@ -0,0 +1,39 @@
1
+#How Do I Add Fixed Unit Conversions in Izenda So Users Can Easily Access Them?
2
+
3
+Functions are added to Izenda through the extended functions API code. This article explains how with an example:
4
+
5
+[[Izenda and UDFs (http://wiki.izenda.us/FAQ/izenda-and-udfs)]]
6
+
7
+These functions are available in the 'Functions' drop-down. They can also be used in an expression by clicking the gear to the right side of the field.
8
+
9
+<font color="red">Add Function Dropdown Pic here</font>
10
+
11
+>_**The specific process to deploy functions depends how the data is stored in the DB, and what the use-case is.**_
12
+
13
+**Example 1**: _Data stored in Meters - Output needed in Meters, Kilometers and Miles._
14
+
15
+If the data for a distance column was stored in meters lets say, and you wanted to display either **meters**, **miles** or **kilometers**. You would add custom Formats (http://www.izenda.com/Site/KB/CodeSamples/Adding-Custom-Formats?) to display desired values to append _(m, km, mi)_, and custom functions to do the conversion to **Miles** and **Kilometers** from **meters**.
16
+
17
+**TO use Example 1 in tool once API work is done:**
18
+
19
+ 1. User selects column 'Distance'.
20
+
21
+ 2a. To display meters; user chooses no function, and chooses 'm' in format.
22
+
23
+ 2b. To display in Miles; user chooses 'Miles' in function dropdown, and 'mi' in format.
24
+
25
+ 2c. To display in Kilometers; user chooses 'Km' in function dropdown, and 'km' in format.
26
+
27
+-----
28
+
29
+**Example 2**: _Data stored in KpG (Kilometers/Gallon) - Output needed in both 'KpG' and 'MpG' (Miles/Gallon)._
30
+
31
+ 1) Add custom Function to convert KpG -> MpG to DB.
32
+
33
+ 2) Add custom Function from DB to Izenda (API)
34
+
35
+ 3) Add custom Formats for 'MpG' and 'KpG'
36
+
37
+ 4a) To display KpG: Choose mileage field, choose no function, choose 'KpG' format.
38
+
39
+ 4b) To display MpG: Choose mileage field, choose 'MpG' function, choose 'MpG' format.
... ...
\ No newline at end of file