Skip to content

Commit dd7d844

Browse files
committed
docs: json functions + some cleanup
Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
1 parent c4ba665 commit dd7d844

File tree

10 files changed

+54
-74
lines changed

10 files changed

+54
-74
lines changed

content/docs/fields/field-types/formula/conditional-expressions.mdx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Conditional Expressions'
2+
title: 'Conditional expressions'
33
description: 'This article explains various conditional expressions that can be used in formula fields.'
44
tags: ['Fields', 'Field types', 'Formula']
55
keywords: ['Fields', 'Field types', 'Formula', 'Create formula field', 'Conditional expressions']
@@ -79,7 +79,7 @@ Output
7979
TRUE if at least one of the conditions `{field} > 2` or `{field} < 10` evaluates to TRUE
8080
```
8181

82-
:::tip
82+
8383
Logical operators, along with Numerical operators can be used to build conditional `expressions`.
8484

8585
Examples:
@@ -97,10 +97,5 @@ SWITCH({quarterNumber},
9797
'INVALID'
9898
)
9999
```
100-
:::
101100

102-
## Related Articles
103-
- [Numeric and Logical Operators](/docs/product-docs/fields/field-types/formula/operators)
104-
- [Numeric Functions](/docs/product-docs/fields/field-types/formula/numeric-functions)
105-
- [String Functions](/docs/product-docs/fields/field-types/formula/string-functions)
106-
- [Date Functions](/docs/product-docs/fields/field-types/formula/date-functions)
101+
---

content/docs/fields/field-types/formula/date-functions.mdx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,3 @@ This function returns the hour of the day as an integer between 0 and 23 (inclus
188188

189189
---
190190

191-
## Related Articles
192-
- [Numeric and Logical Operators](/docs/product-docs/fields/field-types/formula/operators)
193-
- [Numeric Functions](/docs/product-docs/fields/field-types/formula/numeric-functions)
194-
- [String Functions](/docs/product-docs/fields/field-types/formula/string-functions)
195-
- [Conditional Expressions](/docs/product-docs/fields/field-types/formula/conditional-expressions)

content/docs/fields/field-types/formula/formula-result-formatting.mdx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,4 @@ When NocoDB recognizes a formula's output as a Boolean result, you can apply the
6565

6666
---
6767

68-
## Related Articles
69-
- [Numeric Functions](/docs/product-docs/fields/field-types/formula/numeric-functions)
70-
- [String Functions](/docs/product-docs/fields/field-types/formula/string-functions)
71-
- [Date Functions](/docs/product-docs/fields/field-types/formula/date-functions)
72-
- [Conditional Expressions](/docs/product-docs/fields/field-types/formula/conditional-expressions)
7368

content/docs/fields/field-types/formula/formula.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ keywords: ['Fields', 'Field types', 'Formula', 'Create formula field']
3434
- [String Functions](/docs/product-docs/fields/field-types/formula/string-functions)
3535
- [Date Functions](/docs/product-docs/fields/field-types/formula/date-functions)
3636
- [Array Functions](/docs/product-docs/fields/field-types/formula/array-functions)
37+
- [Generic Functions](/docs/product-docs/fields/field-types/formula/generic-functions)
38+
- [JSON Functions](/docs/product-docs/fields/field-types/formula/json-functions)
3739
- [Conditional Expressions](/docs/product-docs/fields/field-types/formula/conditional-expressions)
3840

41+
---
3942

4043

4144

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Generic Functions'
2+
title: 'Generic functions'
33
description: 'This article explains system functions & miscellaneous functions that can be used in formula fields.'
44
tags: ['Fields', 'Field types', 'Formula']
55
keywords: ['Fields', 'Field types', 'Formula', 'Create formula field', 'System functions', 'Miscellaneous functions']
@@ -23,28 +23,3 @@ RECORD_ID() => 1
2323

2424
---
2525

26-
## JSON_EXTRACT
27-
28-
The `JSON_EXTRACT` function extracts a value from a JSON string using a jq-like syntax.
29-
30-
#### Syntax
31-
32-
```plaintext
33-
JSON_EXTRACT(json_string, path)
34-
```
35-
36-
#### Sample
37-
38-
```plaintext
39-
JSON_EXTRACT('{"a": {"b": "c"}}', '.a.b') => "c"
40-
JSON_EXTRACT({json_column}, '.key')
41-
```
42-
43-
#### Remark
44-
45-
* `json_string` must be a valid JSON string.
46-
* `path` follows jq-like dot notation (e.g., `.a.b` to access nested values).
47-
* Returns the extracted value as a string.
48-
49-
50-
---
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: 'JSON functions'
3+
description: 'This article explains various JSON functions that can be used in formula fields.'
4+
tags: ['Fields', 'Field types', 'Formula', 'JSON']
5+
keywords: ['Fields', 'Field types', 'Formula', 'JSON', 'Create formula field', 'JSON functions']
6+
---
7+
8+
This sheet provides a quick reference guide for various JSON functions commonly used in data analysis and programming. Each function is accompanied by its syntax, a sample usage, and a brief description.
9+
10+
## JSON_EXTRACT
11+
12+
The `JSON_EXTRACT` function extracts a value from a JSON string using a jq-like syntax.
13+
14+
#### Syntax
15+
16+
```plaintext
17+
JSON_EXTRACT(json_string, path)
18+
```
19+
20+
#### Sample
21+
22+
```plaintext
23+
JSON_EXTRACT('{"a": {"b": "c"}}', '.a.b') => "c"
24+
JSON_EXTRACT({json_column}, '.key')
25+
```
26+
27+
#### Remark
28+
29+
* `json_string` must be a valid JSON string.
30+
* `path` follows jq-like dot notation (e.g., `.a.b` to access nested values).
31+
* Returns the extracted value as a string.
32+
33+
---

content/docs/fields/field-types/formula/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"array-functions",
1010
"conditional-expressions",
1111
"generic-functions",
12+
"json-functions",
1213
"formula-result-formatting"
1314
]
1415
}

content/docs/fields/field-types/formula/numeric-functions.mdx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,6 @@ VALUE("123$") => 123
358358
VALUE("USD -45.67") => -45.67
359359
```
360360

361-
------------
362-
363-
## Related Articles
364-
- [Numeric and Logical Operators](/docs/product-docs/fields/field-types/formula/operators)
365-
- [String Functions](/docs/product-docs/fields/field-types/formula/string-functions)
366-
- [Date Functions](/docs/product-docs/fields/field-types/formula/date-functions)
367-
- [Conditional Expressions](/docs/product-docs/fields/field-types/formula/conditional-expressions)
361+
---
368362

369363

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Numeric and Logical Operators'
2+
title: 'Numeric and Logical operators'
33
description: 'This article explains various numeric and logical operators that can be used in formula fields.'
44
tags: ['Fields', 'Field types', 'Formula']
55
keywords: ['Fields', 'Field types', 'Formula', 'Create formula field', 'Numeric operators', 'Logical operators', 'String operators']
@@ -8,23 +8,21 @@ keywords: ['Fields', 'Field types', 'Formula', 'Create formula field', 'Numeric
88

99
### Numeric operators
1010

11-
| Operator | Sample | Description |
12-
|----------|-----------------------------|----------------------------------|
11+
| Operator | Sample | Description |
12+
|----------|---------------------------|----------------------------------|
1313
| `+` | `{field1} + {field2} + 2` | Addition of numeric values |
1414
| `-` | `{field1} - {field2}` | Subtraction of numeric values |
1515
| `*` | `{field1} * {field2}` | Multiplication of numeric values |
1616
| `/` | `{field1} / {field2}` | Division of numeric values |
1717

18-
:::tip
19-
To change the order of arithmetic operation, you can use round bracket parenthesis ().
20-
Example: `({field1} + ({field2} * {field3}) / (3 - {field4} ))`
21-
:::
18+
<Callout type="info">To change the order of arithmetic operation, you can use round bracket parenthesis ().
19+
Example: `({field1} + ({field2} * {field3}) / (3 - {field4} ))` </Callout>
2220

2321

2422
### Logical operators
2523

26-
| Operator | Sample | Description |
27-
|----------|--------------------------|--------------------------|
24+
| Operator | Sample | Description |
25+
|----------|------------------------|--------------------------|
2826
| `<` | `{field1} < {field2}` | Less than |
2927
| `>` | `{field1} > {field2}` | Greater than |
3028
| `<=` | `{field1} <= {field2}` | Less than or equal to |
@@ -34,14 +32,9 @@ Example: `({field1} + ({field2} * {field3}) / (3 - {field4} ))`
3432

3533
### String operators
3634

37-
| Operator | Sample | Description |
38-
|----------|--------------------------|--------------------------|
39-
| `&` | `{field1} & {field2}` | String concatenation |
35+
| Operator | Sample | Description |
36+
|----------|-----------------------|----------------------|
37+
| `&` | `{field1} & {field2}` | String concatenation |
4038

4139

42-
## Related Articles
43-
- [Numeric Functions](/docs/product-docs/fields/field-types/formula/numeric-functions)
44-
- [String Functions](/docs/product-docs/fields/field-types/formula/string-functions)
45-
- [Date Functions](/docs/product-docs/fields/field-types/formula/date-functions)
46-
- [Conditional Expressions](/docs/product-docs/fields/field-types/formula/conditional-expressions)
47-
40+
---

content/docs/fields/field-types/formula/string-functions.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,6 @@ ISNOTBLANK('Hello') => true
268268
```
269269

270270

271-
## Related Articles
272-
- [Numeric and Logical Operators](/docs/product-docs/fields/field-types/formula/operators)
273-
- [Numeric Functions](/docs/product-docs/fields/field-types/formula/numeric-functions)
274-
- [Date Functions](/docs/product-docs/fields/field-types/formula/date-functions)
275-
- [Conditional Expressions](/docs/product-docs/fields/field-types/formula/conditional-expressions)
271+
---
276272

277273

0 commit comments

Comments
 (0)