pict-section-formeditor 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +118 -0
  3. package/docs/.nojekyll +0 -0
  4. package/docs/README.md +162 -0
  5. package/docs/_sidebar.md +23 -0
  6. package/docs/_topbar.md +5 -0
  7. package/docs/cover.md +12 -0
  8. package/docs/css/docuserve.css +73 -0
  9. package/docs/index.html +39 -0
  10. package/docs/retold-catalog.json +224 -0
  11. package/docs/retold-keyword-index.json +46846 -0
  12. package/example_applications/form_editor/.quackage.json +10 -0
  13. package/example_applications/form_editor/FormEditor-Example-Application.js +226 -0
  14. package/example_applications/form_editor/html/icon-chooser.html +375 -0
  15. package/example_applications/form_editor/html/index.html +54 -0
  16. package/example_applications/form_editor/package.json +50 -0
  17. package/package.json +55 -0
  18. package/sample_manifests/Complex-Table.json +974 -0
  19. package/sample_manifests/Distill-Example.json +200 -0
  20. package/sample_manifests/Gradebook-Assignment.json +38 -0
  21. package/sample_manifests/Gradebook-Student.json +40 -0
  22. package/sample_manifests/Manyfest-Editor.json +347 -0
  23. package/sample_manifests/Simple-Form.json +232 -0
  24. package/sample_manifests/Simple-Table.json +79 -0
  25. package/source/Pict-Section-FormEditor-DefaultConfiguration.js +3321 -0
  26. package/source/Pict-Section-FormEditor.js +35 -0
  27. package/source/providers/Pict-Provider-ChildPictManager-Application.js +40 -0
  28. package/source/providers/Pict-Provider-ChildPictManager.js +238 -0
  29. package/source/providers/Pict-Provider-FormEditorDocumentation.js +356 -0
  30. package/source/providers/Pict-Provider-FormEditorDragDrop.js +535 -0
  31. package/source/providers/Pict-Provider-FormEditorIconography.js +1002 -0
  32. package/source/providers/Pict-Provider-FormEditorManifestOps.js +1443 -0
  33. package/source/providers/Pict-Provider-FormEditorRendering.js +730 -0
  34. package/source/providers/Pict-Provider-FormEditorUtilities.js +862 -0
  35. package/source/providers/Pict-Provider-PreviewCSS.js +42 -0
  36. package/source/views/PictView-FormEditor-InlineEditing.js +309 -0
  37. package/source/views/PictView-FormEditor-InputTypePicker.js +532 -0
  38. package/source/views/PictView-FormEditor-PropertiesPanel.js +7730 -0
  39. package/source/views/PictView-FormEditor.js +681 -0
  40. package/test/Pict-Section-FormEditor_tests.js +4102 -0
  41. package/user-documentation/.pict_documentation_topics.json +695 -0
  42. package/user-documentation/Getting-Started.md +32 -0
  43. package/user-documentation/Groups.md +52 -0
  44. package/user-documentation/Inputs.md +98 -0
  45. package/user-documentation/Sections.md +36 -0
  46. package/user-documentation/Shortcuts.md +44 -0
  47. package/user-documentation/Solver-Expression-Walkthrough.md +176 -0
  48. package/user-documentation/Solver-Expressions-Advanced.md +344 -0
  49. package/user-documentation/Solver-Functions.md +213 -0
  50. package/user-documentation/Solvers.md +81 -0
  51. package/user-documentation/ToC.md +18 -0
  52. package/user-documentation/solverfunctions/abs.md +84 -0
  53. package/user-documentation/solverfunctions/aggregationhistogram.md +83 -0
  54. package/user-documentation/solverfunctions/aggregationhistogrambyobject.md +64 -0
  55. package/user-documentation/solverfunctions/arrayconcat.md +64 -0
  56. package/user-documentation/solverfunctions/avg.md +81 -0
  57. package/user-documentation/solverfunctions/bucketset.md +69 -0
  58. package/user-documentation/solverfunctions/ceil.md +70 -0
  59. package/user-documentation/solverfunctions/cleanvaluearray.md +66 -0
  60. package/user-documentation/solverfunctions/cleanvalueobject.md +68 -0
  61. package/user-documentation/solverfunctions/colorgroupbackground.md +60 -0
  62. package/user-documentation/solverfunctions/colorinputbackground.md +62 -0
  63. package/user-documentation/solverfunctions/colorinputbackgroundtabular.md +64 -0
  64. package/user-documentation/solverfunctions/colorsectionbackground.md +59 -0
  65. package/user-documentation/solverfunctions/compare.md +72 -0
  66. package/user-documentation/solverfunctions/concat.md +73 -0
  67. package/user-documentation/solverfunctions/concatraw.md +73 -0
  68. package/user-documentation/solverfunctions/cos.md +75 -0
  69. package/user-documentation/solverfunctions/count.md +73 -0
  70. package/user-documentation/solverfunctions/countset.md +65 -0
  71. package/user-documentation/solverfunctions/countsetelements.md +63 -0
  72. package/user-documentation/solverfunctions/createarrayfromabsolutevalues.md +63 -0
  73. package/user-documentation/solverfunctions/createvalueobjectbyhashes.md +69 -0
  74. package/user-documentation/solverfunctions/cumulativesummation.md +96 -0
  75. package/user-documentation/solverfunctions/dateadddays.md +79 -0
  76. package/user-documentation/solverfunctions/dateaddhours.md +74 -0
  77. package/user-documentation/solverfunctions/dateaddmilliseconds.md +65 -0
  78. package/user-documentation/solverfunctions/dateaddminutes.md +72 -0
  79. package/user-documentation/solverfunctions/dateaddmonths.md +74 -0
  80. package/user-documentation/solverfunctions/dateaddseconds.md +66 -0
  81. package/user-documentation/solverfunctions/dateaddweeks.md +73 -0
  82. package/user-documentation/solverfunctions/dateaddyears.md +74 -0
  83. package/user-documentation/solverfunctions/datedaydifference.md +84 -0
  84. package/user-documentation/solverfunctions/datefromparts.md +81 -0
  85. package/user-documentation/solverfunctions/datehourdifference.md +64 -0
  86. package/user-documentation/solverfunctions/datemathadd.md +72 -0
  87. package/user-documentation/solverfunctions/datemilliseconddifference.md +64 -0
  88. package/user-documentation/solverfunctions/dateminutedifference.md +64 -0
  89. package/user-documentation/solverfunctions/datemonthdifference.md +66 -0
  90. package/user-documentation/solverfunctions/dateseconddifference.md +64 -0
  91. package/user-documentation/solverfunctions/dateweekdifference.md +65 -0
  92. package/user-documentation/solverfunctions/dateyeardifference.md +64 -0
  93. package/user-documentation/solverfunctions/differencearrays.md +59 -0
  94. package/user-documentation/solverfunctions/disablesolverordinal.md +58 -0
  95. package/user-documentation/solverfunctions/distributionhistogram.md +96 -0
  96. package/user-documentation/solverfunctions/distributionhistogrambyobject.md +64 -0
  97. package/user-documentation/solverfunctions/enablesolverordinal.md +57 -0
  98. package/user-documentation/solverfunctions/entryinset.md +72 -0
  99. package/user-documentation/solverfunctions/euler.md +77 -0
  100. package/user-documentation/solverfunctions/exp.md +74 -0
  101. package/user-documentation/solverfunctions/findfirstvaluebyexactmatch.md +67 -0
  102. package/user-documentation/solverfunctions/findfirstvaluebystringincludes.md +67 -0
  103. package/user-documentation/solverfunctions/flatten.md +76 -0
  104. package/user-documentation/solverfunctions/floor.md +70 -0
  105. package/user-documentation/solverfunctions/gaussianelimination.md +75 -0
  106. package/user-documentation/solverfunctions/generatearrayofobjectsfromsets.md +70 -0
  107. package/user-documentation/solverfunctions/generatehtmlhexcolor.md +67 -0
  108. package/user-documentation/solverfunctions/getvalue.md +90 -0
  109. package/user-documentation/solverfunctions/getvaluearray.md +64 -0
  110. package/user-documentation/solverfunctions/getvalueobject.md +67 -0
  111. package/user-documentation/solverfunctions/hidesections.md +58 -0
  112. package/user-documentation/solverfunctions/if.md +109 -0
  113. package/user-documentation/solverfunctions/iterativeseries.md +107 -0
  114. package/user-documentation/solverfunctions/join.md +75 -0
  115. package/user-documentation/solverfunctions/joinraw.md +64 -0
  116. package/user-documentation/solverfunctions/largestinset.md +63 -0
  117. package/user-documentation/solverfunctions/leastsquares.md +66 -0
  118. package/user-documentation/solverfunctions/linest.md +58 -0
  119. package/user-documentation/solverfunctions/log.md +74 -0
  120. package/user-documentation/solverfunctions/logvalues.md +65 -0
  121. package/user-documentation/solverfunctions/match.md +71 -0
  122. package/user-documentation/solverfunctions/matrixinverse.md +67 -0
  123. package/user-documentation/solverfunctions/matrixmultiply.md +71 -0
  124. package/user-documentation/solverfunctions/matrixtranspose.md +72 -0
  125. package/user-documentation/solverfunctions/matrixvectormultiply.md +69 -0
  126. package/user-documentation/solverfunctions/max.md +73 -0
  127. package/user-documentation/solverfunctions/mean.md +63 -0
  128. package/user-documentation/solverfunctions/median.md +79 -0
  129. package/user-documentation/solverfunctions/min.md +73 -0
  130. package/user-documentation/solverfunctions/mode.md +66 -0
  131. package/user-documentation/solverfunctions/objectkeystoarray.md +66 -0
  132. package/user-documentation/solverfunctions/objectvaluessortbyexternalobjectarray.md +65 -0
  133. package/user-documentation/solverfunctions/objectvaluestoarray.md +67 -0
  134. package/user-documentation/solverfunctions/percent.md +75 -0
  135. package/user-documentation/solverfunctions/pi.md +77 -0
  136. package/user-documentation/solverfunctions/polynomialregression.md +69 -0
  137. package/user-documentation/solverfunctions/predict.md +71 -0
  138. package/user-documentation/solverfunctions/rad.md +85 -0
  139. package/user-documentation/solverfunctions/randomfloat.md +63 -0
  140. package/user-documentation/solverfunctions/randomfloatbetween.md +72 -0
  141. package/user-documentation/solverfunctions/randomfloatupto.md +65 -0
  142. package/user-documentation/solverfunctions/randominteger.md +56 -0
  143. package/user-documentation/solverfunctions/randomintegerbetween.md +72 -0
  144. package/user-documentation/solverfunctions/randomintegerupto.md +64 -0
  145. package/user-documentation/solverfunctions/refreshtabularsection.md +57 -0
  146. package/user-documentation/solverfunctions/resolvehtmlentities.md +64 -0
  147. package/user-documentation/solverfunctions/round.md +111 -0
  148. package/user-documentation/solverfunctions/runsolvers.md +49 -0
  149. package/user-documentation/solverfunctions/setconcatenate.md +64 -0
  150. package/user-documentation/solverfunctions/setgroupvisibility.md +60 -0
  151. package/user-documentation/solverfunctions/setsectionvisibility.md +59 -0
  152. package/user-documentation/solverfunctions/setsolverordinalenabled.md +59 -0
  153. package/user-documentation/solverfunctions/settabularrowlength.md +57 -0
  154. package/user-documentation/solverfunctions/setvalue.md +65 -0
  155. package/user-documentation/solverfunctions/showsections.md +58 -0
  156. package/user-documentation/solverfunctions/sin.md +83 -0
  157. package/user-documentation/solverfunctions/slice.md +80 -0
  158. package/user-documentation/solverfunctions/smallestinset.md +63 -0
  159. package/user-documentation/solverfunctions/sortarray.md +58 -0
  160. package/user-documentation/solverfunctions/sorthistogram.md +70 -0
  161. package/user-documentation/solverfunctions/sorthistogrambykeys.md +69 -0
  162. package/user-documentation/solverfunctions/sortset.md +75 -0
  163. package/user-documentation/solverfunctions/sqrt.md +85 -0
  164. package/user-documentation/solverfunctions/stdev.md +81 -0
  165. package/user-documentation/solverfunctions/stdeva.md +58 -0
  166. package/user-documentation/solverfunctions/stdevp.md +83 -0
  167. package/user-documentation/solverfunctions/stringcountsegments.md +66 -0
  168. package/user-documentation/solverfunctions/stringgetsegments.md +74 -0
  169. package/user-documentation/solverfunctions/subtractingsummation.md +66 -0
  170. package/user-documentation/solverfunctions/sum.md +78 -0
  171. package/user-documentation/solverfunctions/tan.md +78 -0
  172. package/user-documentation/solverfunctions/tofixed.md +75 -0
  173. package/user-documentation/solverfunctions/unionarrays.md +59 -0
  174. package/user-documentation/solverfunctions/uniquearray.md +58 -0
  175. package/user-documentation/solverfunctions/var.md +67 -0
  176. package/user-documentation/solverfunctions/vara.md +58 -0
  177. package/user-documentation/solverfunctions/varp.md +66 -0
  178. package/user-documentation/solverfunctions/when.md +98 -0
@@ -0,0 +1,74 @@
1
+ # stringgetsegments
2
+
3
+ Splits a string into segments by a delimiter.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ stringgetsegments(text, delimiter)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `text` | String | The string to split |
16
+ | `delimiter` | String | The delimiter to split by |
17
+
18
+ ## Returns
19
+
20
+ Array - Array of string segments.
21
+
22
+ ## Description
23
+
24
+ The `stringgetsegments` function splits a string by a specified delimiter and returns an array of the resulting segments.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = STRINGGETSEGMENTS("a,b,c,d,e", ",")
32
+ // Result: ["a", "b", "c", "d", "e"]
33
+ ```
34
+
35
+ ### Path Parsing
36
+
37
+ ```expression
38
+ PathParts = STRINGGETSEGMENTS("/home/user/documents", "/")
39
+ // Result: ["", "home", "user", "documents"]
40
+ ```
41
+
42
+ ### Data Extraction
43
+
44
+ ```expression
45
+ Fields = STRINGGETSEGMENTS(CSVLine, ",")
46
+ // Returns array of field values
47
+ ```
48
+
49
+ ### Get Specific Segment
50
+
51
+ ```expression
52
+ // Get second segment
53
+ Segments = STRINGGETSEGMENTS(Data, ",")
54
+ SecondItem = Segments[1]
55
+ ```
56
+
57
+ ## Use Cases
58
+
59
+ - **CSV parsing**: Split delimited lines
60
+ - **Path processing**: Extract path components
61
+ - **Data parsing**: Split structured strings
62
+ - **Text processing**: Tokenize text
63
+
64
+ ## Related Functions
65
+
66
+ - [stringcountsegments](./stringcountsegments.md) - Count segments
67
+ - [join](./join.md) - Reverse operation (join segments)
68
+ - [slice](./slice.md) - Get subset of segments
69
+
70
+ ## Notes
71
+
72
+ - Returns array of strings
73
+ - Empty between delimiters creates empty string
74
+ - Uses the Utility service
@@ -0,0 +1,66 @@
1
+ # subtractingsummation
2
+
3
+ Generates a subtracting running total from an array of values.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ subtractingsummation(array)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | Array of numeric values |
16
+
17
+ ## Returns
18
+
19
+ Array - Array of running differences.
20
+
21
+ ## Description
22
+
23
+ The `subtractingsummation` function creates an array where each element is the result of subtracting subsequent values from a running total. This is the opposite of cumulative summation.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = SUBTRACTINGSUMMATION([100, 20, 30, 10])
31
+ // Result: [100, 80, 50, 40]
32
+ // 100, 100-20=80, 80-30=50, 50-10=40
33
+ ```
34
+
35
+ ### Budget Tracking
36
+
37
+ ```expression
38
+ // Start with budget, subtract expenses
39
+ RemainingBudget = SUBTRACTINGSUMMATION([1000, 250, 150, 75, 200])
40
+ // Shows remaining after each expense
41
+ ```
42
+
43
+ ### Inventory Depletion
44
+
45
+ ```expression
46
+ InventoryLevels = SUBTRACTINGSUMMATION([500, 50, 30, 100, 25])
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Budget tracking**: Remaining funds after expenses
52
+ - **Inventory**: Stock levels after withdrawals
53
+ - **Resource depletion**: Tracking consumption
54
+ - **Countdown**: Decreasing totals
55
+
56
+ ## Related Functions
57
+
58
+ - [cumulativesummation](./cumulativesummation.md) - Running total (adding)
59
+ - [sum](./sum.md) - Simple sum
60
+ - [iterativeseries](./iterativeseries.md) - Custom iterative calculation
61
+
62
+ ## Notes
63
+
64
+ - First element is starting value
65
+ - Each subsequent element subtracts from running total
66
+ - Uses the Math service's `subtractingSummation` method
@@ -0,0 +1,78 @@
1
+ # sum
2
+
3
+ Calculates the sum of all values in a set.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ sum(array)
9
+ sum(value1, value2, ...)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `array` | Array | An array of numeric values |
17
+ | `values` | Numbers | Individual values to sum |
18
+
19
+ ## Returns
20
+
21
+ String - The sum of all values with arbitrary precision.
22
+
23
+ ## Description
24
+
25
+ The `sum` function adds up all numeric values in an array or set of arguments. It uses arbitrary precision arithmetic for accurate calculations.
26
+
27
+ ## Examples
28
+
29
+ ### Basic Array Sum
30
+
31
+ ```expression
32
+ TotalCost = SUM(ItemCosts)
33
+ // With ItemCosts = [100, 200, 50, 45, 5]
34
+ // Result: "400"
35
+ ```
36
+
37
+ ### Sum with Flattened Arrays
38
+
39
+ ```expression
40
+ // Sum population from nested data
41
+ PopSum = sum(flatten(AppData.Cities[].population))
42
+ // Sums all population values from the Cities array
43
+ ```
44
+
45
+ ### Sum of Histogram Values
46
+
47
+ ```expression
48
+ // Sum aggregated values
49
+ Total = SUM(FLATTEN(AppData.DestinationObject.AggregationResult))
50
+ ```
51
+
52
+ ### Combining with Other Functions
53
+
54
+ ```expression
55
+ // Sum a computed series
56
+ IntegratedSeries = SUM(FLATTEN(AppData.SeriesFromCoefficients))
57
+ ```
58
+
59
+ ## Use Cases
60
+
61
+ - **Financial totals**: Sum of transactions, costs, revenues
62
+ - **Inventory**: Total quantity of items
63
+ - **Statistics**: First step in many statistical calculations
64
+ - **Aggregation**: Combining values from multiple sources
65
+
66
+ ## Related Functions
67
+
68
+ - [avg](./avg.md) / [mean](./mean.md) - Calculate average
69
+ - [count](./count.md) - Count elements
70
+ - [min](./min.md) / [max](./max.md) - Find extremes
71
+ - [cumulativesummation](./cumulativesummation.md) - Running total
72
+
73
+ ## Notes
74
+
75
+ - Uses arbitrary precision arithmetic
76
+ - Returns "0" for empty arrays
77
+ - Non-numeric values may be treated as 0
78
+ - Works with the Math service's `sumPrecise` method
@@ -0,0 +1,78 @@
1
+ # tan
2
+
3
+ Calculates the tangent of an angle (in radians).
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ tan(radians)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `radians` | Number/String | The angle in radians |
16
+
17
+ ## Returns
18
+
19
+ String - The tangent of the angle.
20
+
21
+ ## Description
22
+
23
+ The `tan` function calculates the tangent of an angle, which equals sin(angle)/cos(angle). The input must be in radians. Use the `rad()` function to convert degrees to radians if needed.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = tan(0)
31
+ // Result: "0"
32
+
33
+ Result = tan(0.7853981633974483) // π/4 (45 degrees)
34
+ // Result: "1" (approximately)
35
+ ```
36
+
37
+ ### Converting from Degrees
38
+
39
+ ```expression
40
+ // Tangent of 45 degrees
41
+ Result = tan(rad(45))
42
+ // Result: "1"
43
+
44
+ // Tangent of 30 degrees
45
+ Result = tan(rad(30))
46
+ // Result: "0.5773502691896257"
47
+ ```
48
+
49
+ ### Slope Calculations
50
+
51
+ ```expression
52
+ // Calculate slope from angle
53
+ Slope = tan(rad(AngleDegrees))
54
+
55
+ // Rise over run
56
+ Rise = Run * tan(Angle)
57
+ ```
58
+
59
+ ## Use Cases
60
+
61
+ - **Trigonometry**: Slope and angle calculations
62
+ - **Surveying**: Elevation changes
63
+ - **Physics**: Incline problems
64
+ - **Graphics**: Perspective calculations
65
+
66
+ ## Related Functions
67
+
68
+ - [sin](./sin.md) - Sine
69
+ - [cos](./cos.md) - Cosine
70
+ - [rad](./rad.md) - Convert degrees to radians
71
+ - [pi](./pi.md) - Pi constant
72
+
73
+ ## Notes
74
+
75
+ - Input must be in radians, not degrees
76
+ - Use `rad(degrees)` to convert from degrees
77
+ - Tangent is undefined at 90°, 270°, etc. (π/2, 3π/2, ...)
78
+ - Uses JavaScript's `Math.tan()` internally
@@ -0,0 +1,75 @@
1
+ # tofixed
2
+
3
+ Formats a number with a specified number of decimal places.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ tofixed(value, decimalPlaces)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `value` | Number | The number to format |
16
+ | `decimalPlaces` | Number | Number of decimal places to display |
17
+
18
+ ## Returns
19
+
20
+ String - The number formatted with the specified decimal places.
21
+
22
+ ## Description
23
+
24
+ The `tofixed` function formats a number to a fixed number of decimal places. This is useful for displaying currency, percentages, and other formatted numeric values.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = TOFIXED(3.14159, 2)
32
+ // Result: "3.14"
33
+ ```
34
+
35
+ ### Currency Formatting
36
+
37
+ ```expression
38
+ Price = TOFIXED(19.9, 2)
39
+ // Result: "19.90"
40
+ ```
41
+
42
+ ### Rounding
43
+
44
+ ```expression
45
+ Result = TOFIXED(2.567, 1)
46
+ // Result: "2.6"
47
+ ```
48
+
49
+ ### With Calculations
50
+
51
+ ```expression
52
+ // Format a calculated percentage
53
+ FormattedPercent = TOFIXED(PERCENT(Completed, Total) * 100, 1)
54
+ ```
55
+
56
+ ## Use Cases
57
+
58
+ - **Currency display**: Format prices and amounts
59
+ - **Percentage display**: Format percentages with precision
60
+ - **Scientific data**: Consistent decimal places
61
+ - **Reports**: Standardized number formatting
62
+
63
+ ## Related Functions
64
+
65
+ - [round](./round.md) - Round to nearest integer
66
+ - [floor](./floor.md) - Round down
67
+ - [ceil](./ceil.md) - Round up
68
+ - [percent](./percent.md) - Calculate percentages
69
+
70
+ ## Notes
71
+
72
+ - Always returns specified number of decimal places
73
+ - Pads with zeros if necessary (19.9 → "19.90")
74
+ - Uses the Math service's `toFixedPrecise` method
75
+ - Returns result as string
@@ -0,0 +1,59 @@
1
+ # unionarrays
2
+
3
+ Returns a new array containing all unique values from both input arrays (set union).
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ unionarrays(array1, array2)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array1` | Array | The first array |
16
+ | `array2` | Array | The second array |
17
+
18
+ ## Returns
19
+
20
+ A new array containing all unique values from both input arrays.
21
+
22
+ ## Description
23
+
24
+ The `unionarrays` function performs a set union operation on two arrays. It combines both arrays and removes any duplicate values, returning a new array that contains every distinct value present in either input array. This is useful for merging lists while ensuring no value appears more than once.
25
+
26
+ ## Examples
27
+
28
+ ### Combining two teams
29
+
30
+ ```expression
31
+ Combined = unionarrays(TeamA, TeamB)
32
+ // If TeamA is ["Alice", "Bob"] and TeamB is ["Bob", "Carol"],
33
+ // Combined is ["Alice", "Bob", "Carol"]
34
+ ```
35
+
36
+ ### Merging selected options
37
+
38
+ ```expression
39
+ AllSelections = unionarrays(PreviousSelections, NewSelections)
40
+ // Combines both selection lists with no duplicates
41
+ ```
42
+
43
+ ## Use Cases
44
+
45
+ - **Merging lists**: Combine two lists of items while eliminating duplicates
46
+ - **Accumulating selections**: Merge newly selected items with previously selected items
47
+ - **Building unique sets**: Create a comprehensive list from multiple sources
48
+
49
+ ## Related Functions
50
+
51
+ - [differencearrays](./differencearrays.md) - Returns values in one array that are not in another
52
+ - [uniquearray](./uniquearray.md) - Removes duplicates from a single array
53
+ - [sortarray](./sortarray.md) - Returns a sorted copy of an array
54
+
55
+ ## Notes
56
+
57
+ - Both parameters must be arrays
58
+ - The returned array contains no duplicate values
59
+ - The order of elements in the result is not guaranteed to match either input
@@ -0,0 +1,58 @@
1
+ # uniquearray
2
+
3
+ Returns a new array with duplicate values removed.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ uniquearray(array)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | The array to deduplicate |
16
+
17
+ ## Returns
18
+
19
+ A new array containing only the unique values from the input array.
20
+
21
+ ## Description
22
+
23
+ The `uniquearray` function takes an array and returns a new array with all duplicate values removed. Each value in the resulting array appears exactly once. This is useful for cleaning up lists that may contain repeated entries.
24
+
25
+ ## Examples
26
+
27
+ ### Removing duplicate states
28
+
29
+ ```expression
30
+ UniqueStates = uniquearray(AllStates)
31
+ // If AllStates is ["NY", "CA", "NY", "TX", "CA"],
32
+ // UniqueStates is ["NY", "CA", "TX"]
33
+ ```
34
+
35
+ ### Deduplicating collected values
36
+
37
+ ```expression
38
+ CleanList = uniquearray(RawInputList)
39
+ // Returns the list with all duplicates removed
40
+ ```
41
+
42
+ ## Use Cases
43
+
44
+ - **Cleaning data**: Remove duplicate entries from a list of collected values
45
+ - **Building option lists**: Create a list of distinct values for dropdowns or selection controls
46
+ - **Preparing data for display**: Ensure a list shown to the user contains no repeated items
47
+
48
+ ## Related Functions
49
+
50
+ - [unionarrays](./unionarrays.md) - Returns all unique values from both arrays
51
+ - [differencearrays](./differencearrays.md) - Returns values in one array that are not in another
52
+ - [sortarray](./sortarray.md) - Returns a sorted copy of an array
53
+
54
+ ## Notes
55
+
56
+ - The input must be an array
57
+ - The order of first appearance is generally preserved
58
+ - Comparison is based on value equality
@@ -0,0 +1,67 @@
1
+ # var
2
+
3
+ Calculates the variance of a sample dataset.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ var(value1, value2, ...)
9
+ var(array)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `values` | Number(s) | Individual numbers or an array of numbers |
17
+
18
+ ## Returns
19
+
20
+ String - The sample variance.
21
+
22
+ ## Description
23
+
24
+ The `var` function calculates the variance of a sample dataset using the sample variance formula (dividing by n-1). Variance measures how spread out the values are from the mean.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = VAR(2, 4, 6, 8, 10)
32
+ // Result: "10" (sample variance)
33
+ ```
34
+
35
+ ### With Array
36
+
37
+ ```expression
38
+ Variance = VAR(FLATTEN(AppData.Scores))
39
+ ```
40
+
41
+ ### Quality Control
42
+
43
+ ```expression
44
+ // Check variance in measurements
45
+ MeasurementVariance = VAR(Measurements)
46
+ ```
47
+
48
+ ## Use Cases
49
+
50
+ - **Quality control**: Measure consistency
51
+ - **Statistics**: Distribution analysis
52
+ - **Finance**: Investment risk
53
+ - **Research**: Data spread analysis
54
+
55
+ ## Related Functions
56
+
57
+ - [vara](./vara.md) - Variance including text/boolean
58
+ - [varp](./varp.md) - Population variance
59
+ - [stdev](./stdev.md) - Standard deviation
60
+ - [avg](./avg.md) - Mean value
61
+
62
+ ## Notes
63
+
64
+ - Uses sample variance formula (n-1 divisor)
65
+ - For population variance, use `varp`
66
+ - Returns result as string
67
+ - Uses the Math service's `varPrecise` method
@@ -0,0 +1,58 @@
1
+ # vara
2
+
3
+ Calculates variance including text and boolean values.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ vara(value1, value2, ...)
9
+ vara(array)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `values` | Any | Values including numbers, text, and booleans |
17
+
18
+ ## Returns
19
+
20
+ String - The variance including converted text/boolean values.
21
+
22
+ ## Description
23
+
24
+ The `vara` function calculates sample variance while treating text as 0 and boolean TRUE as 1, FALSE as 0. This is similar to Excel's VARA function.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = VARA(1, 2, true, false, "text")
32
+ // Text = 0, true = 1, false = 0
33
+ ```
34
+
35
+ ### With Mixed Data
36
+
37
+ ```expression
38
+ Variance = VARA(MixedDataArray)
39
+ ```
40
+
41
+ ## Use Cases
42
+
43
+ - **Mixed data**: Variance with non-numeric values
44
+ - **Spreadsheet compatibility**: Excel-like behavior
45
+ - **Survey data**: Handle mixed responses
46
+
47
+ ## Related Functions
48
+
49
+ - [var](./var.md) - Numeric-only variance
50
+ - [varp](./varp.md) - Population variance
51
+ - [stdeva](./stdeva.md) - Standard deviation with text/boolean
52
+
53
+ ## Notes
54
+
55
+ - Text values treated as 0
56
+ - TRUE = 1, FALSE = 0
57
+ - Uses sample variance formula (n-1)
58
+ - Uses the Math service's `varaPrecise` method
@@ -0,0 +1,66 @@
1
+ # varp
2
+
3
+ Calculates the variance of an entire population.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ varp(value1, value2, ...)
9
+ varp(array)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `values` | Number(s) | Individual numbers or an array of numbers |
17
+
18
+ ## Returns
19
+
20
+ String - The population variance.
21
+
22
+ ## Description
23
+
24
+ The `varp` function calculates the variance of an entire population using the population variance formula (dividing by n). Use this when your data represents the entire population, not a sample.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = VARP(2, 4, 6, 8, 10)
32
+ // Result: "8" (population variance)
33
+ ```
34
+
35
+ ### With Array
36
+
37
+ ```expression
38
+ PopVariance = VARP(FLATTEN(AppData.AllMeasurements))
39
+ ```
40
+
41
+ ### Complete Dataset
42
+
43
+ ```expression
44
+ // When you have all values, not a sample
45
+ TotalVariance = VARP(EntireDataset)
46
+ ```
47
+
48
+ ## Use Cases
49
+
50
+ - **Census data**: Complete population statistics
51
+ - **Quality control**: All measurements available
52
+ - **Inventory**: Entire inventory analysis
53
+ - **Deterministic systems**: Complete data known
54
+
55
+ ## Related Functions
56
+
57
+ - [var](./var.md) - Sample variance
58
+ - [vara](./vara.md) - Variance with text/boolean
59
+ - [stdevp](./stdevp.md) - Population standard deviation
60
+
61
+ ## Notes
62
+
63
+ - Uses population variance formula (n divisor)
64
+ - For samples, use `var` instead
65
+ - Returns result as string
66
+ - Uses the Math service's `varpPrecise` method