Commit Graph
23 Commits
Author SHA1 Message Date
Jérémie PardouandTsering Paljor 1874ac19f4 feat: port grouped aggregations data source to builder (#5546)
Co-authored-by: Tsering Paljor <tsering@baserow.io>
2026-09-17 07:41:59 +00:00
Tsering Paljor 7395169508 feat: Add from_json() and to_json() expressions (#5557)
* Add from_json() and to_json() expressions.

* Fix rebase mistake

* Refactor from/to json runtime formula types to re-use existing json ensurer.

* Add frontend counterpart for ensure json

* Rename regex var

* Simplify formula check.

* Improve formula function detection when JSON load fails
2026-07-01 16:28:22 +07:00
Tsering PaljorandJeremie Pardou 87fbf1f2bb feat: Add Runtime Formula for formatting numbers (#5262)
* Add new skill for creating/updating runtime formulas.

* Add abs() formula function

* Add getErrorMessage() to arg type to return a human-readable error message.

* Update skill to ensure getErrorMessage() is overridden when appropriate.

* Add null() runtime formula.

* Add number_format() runtime formula.

* Fix tests

* Add changelog entry

* Add date_interval() runtime formula.

* Fix test

* Add runtime formula: to_datetime()

* Update changelog

* Fix backend test

* Fix frontend test

* Add new ensure_date_interval() ensurer.

* Update descriptions and examples.

* Remove references to Moment.js

* Refactor validate_type_of_args() to return the index of the invalid arg.

* Refactor to_datetime() to use ensure_datetime()

* Use ensure_date_interval ensurer for IntervalStringBaserowRuntimeFormulaArgumentType

* Update skill with sections on ensurers.

* Add optional strict arg to ensure_datetime()

* Fix tests

* Simplify the ensure_string() to return total seconds for timedelta.

* ensure_date_interval() should also try to convert numbers to a timedelta.

* Fix test

* Use ensure_integer() in ensure_date_interval()

* Rename DateInterval to Duration

* Return an array of all possible errors.

* Use database duration parser for consistency

* Remove contrib references in core.

* Add additional test coverage

* Rename duration to to_duration

* Attempt to fix CI

* Reverting some changes

* Ensure empty string '' isn't accepted as a datetime format.

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-05-26 14:47:13 +07:00
Tsering Paljor 782a130605 Tests for Advanced Formulas (#4193)
* Initial batch of tests

* Ensure castToInt/castToFloat is taken care of by parser for random int/float

* Fix tests after rebase

* Update Boolean arg type to use ensurer in test()

* Add remaining tests for argument types

* 'and' and 'or' should be operator types

* Add 'and' and 'or' operators to formula visitor

* Add frontend tests

* Add integration tests for runtime formulas

* Disable flakey test

* Replace manual field name construction with db_column
2025-11-13 15:00:41 +04:00
Jérémie Pardou 3554e61e88 Don't validate formula parameter value (#4207) 2025-11-11 18:01:33 +01:00
Tsering Paljor e507ce9a89 Improvements to Advanced Formulas (#4169)
* Allow lexicographical comparisons for >, <, >=, and <= operators.

* Improve/correct examples

* Ensure arithmetic operators can accept 2 or more args. Ensure frontend/backend formula functions are implemented similarly.

* Add  and  formula types.

* Fix bug reported by Frederik: concat should use Text arg type

* Update examples and small fixes.

* Lint fix

* Update and/or examples to use symbols. Add useStrict option to ensureBoolean().

* For operators, specify 2 args, since operators already reduce

* Replace manual checking of arg len

* Ensure backend implementation matches frontend

* Add castToInt option and make 2nd arg to round() an optional int

* Lint fix
2025-11-10 15:19:31 +04:00
Tsering Paljor 108c3ce793 Advanced formula improvements (#4144)
* Formula should be considered invalid if it can't be resolved.

* Add boolean argument type

* Improve formula validation

* Improve validators.

* Lint fix

* Add changelog

* Clean up import
2025-10-30 18:33:48 +04:00
44ca4f812e Advanced formulas + new formula functions (#4082)
* Changes to allow testing literal formula in table field mappings

* Add formula function: upper()

* Use ensure*() in the test/parse methods. Add more functions.

* Add operators, description, and examples.

* Add addable and subtractable types

* Add random generator functions

* Add tests.

* Working formula input

* Simplify

* Further simplify

* Still working - simplified further

* Lint

* Undo changes in FieldMappingForm

* Use advanced mode, not raw

* Temp fix to align the checkbox and button

* Lint fix backend

* Lint fix frontend

* Lint fix

* Add translations

* Add advanced formulas to application builder

---------

Co-authored-by: Tsering Paljor <tsering@baserow.io>
Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2025-10-28 09:21:58 +04:00
Evren Ozkan 7a82d49f2f 3566 Fix timezone handling in AB's datetime picker 2025-09-08 08:27:15 +02:00
Jérémie Pardou f648aae776 Add File input element 2025-04-28 15:52:44 +02:00
Evren Ozkan 87e600171c Fix "number" validation for handling of decimal numbers with using comma or dot as decimal separator 2025-04-07 08:33:33 +00:00
Evren Ozkan 332ec39ef6 Add array support to query parameters validation handlers 2025-03-31 09:55:57 +00:00
Evren Ozkan f9cbd62473 feat: Add rating elements to app builder 2025-03-27 13:34:31 +00:00
Evren Ozkan 557b8966f8 Add query_parameters to pages 2025-02-03 15:37:04 +00:00
Afonso Silva cee61bd8aa Resolve "Add date time picker element" 2024-11-26 11:23:15 +00:00
Tsering Paljor c535d32312 Make User Source Role field more robust when using Formulas 2024-11-19 15:15:32 +00:00
Tsering Paljor f62bc2af65 Allow Integer as a valid Option Value for ChoiceElement 2024-09-04 09:01:12 +00:00
Afonso Silva 279fb5f738 Resolve "Add multi-tag collection field" 2024-05-07 08:25:48 +00:00
Afonso Silva 30be7b7326 Resolve "Data explorer shows bad type for complex data" 2024-03-27 12:01:43 +00:00
Peter Evans f2bde81b16 Resolve "Add image element sizing in the style tab." 2024-01-24 16:15:11 +00:00
Peter Evans 18a73c4ed0 Resolve "Validate the PreviewNavigationBar parameters values against their type." 2024-01-09 17:41:09 +00:00
Alexander Haller af2ff2dd6e Resolve "Checkbox element" 2024-01-04 13:10:44 +00:00
Jérémie Pardou 73e51624db Resolve "Use integration & data source in elements" 2023-08-04 14:29:34 +00:00