Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As demonstrated in watercooler - lab day work to support formula response types.
Currently formulas will generally return strings, the only exception is dynamic Javascript formulas can return native types, however it is quite undefined. Having a method to actually define what the response means that we can coerce the results to check they fit this result type.
For now I've restricted to a couple of core primitive types that can be returned from the rows API - strings, numbers, booleans and datetimes.
This is done at the API layer, so all rows returned from internal/external tables with a formula will now have the correct primitive type based on what is set. Formulas without anything set will continue to have the exact functionality they have today (HBS string, JS less defined).
This also means handlebars can actually return a primitive now from a formula, which can be very helpful.
Screenshots
UI:
Grid correctly representing formulas of these response types: