Define dropdown values from an existing store
The dropdown element values are manual for now but we want to be able to link these values to an existing dropdown values from a field of a table.
- Add properties:
- One to select the type of options: manual options, Options from a data source field, formulas options
- formula_value: formula field
- formula_name: formula field
- selected_option_source: formula
New data providerDataSourceSelectOptionsDataProviderType
-> that looks the defined data sources and use the related service to get the existing options. This data provider returns the array of select options for each field of the data source that have options- Add two serializer values regarding context_data and its schema:
- Implement these new methods for the existing service types (Get row, list rows, upsert row)
- Improve the
DataSourceDataProviderType
to include the schema from the context_data to the schema returned by the DataSourceDataProvider (FE and BE). Include the data to thegetDataContent
as well. - The new values should be accessible in the data explorer like that:
- Then add an option to select whether you want manual options, Options from a data source field, formulas options
- Implement the formulas options with two formulas:
-
Check that it's not necessary to migrate the formula as it should work as previously.
-
(V2) Then implement the
option from data source
populating the formulas behind the scene when you select a field (listed from the data provider may be?)
Edited by Jérémie Pardou