So I have a certain table element that uses a “valueOptions” tag to limit and display a list of values to the user while editing the table via the One Data App.
As per the apps documentation the “sourceOptions” feature can be used inside the valueOptions in order to limit the value coming from the source itself.
My question is: Would it be possible to limit the data available as options for the column which is being edited based on a comparison with the value of another column in the same row.
eg: Say Table_1 has columns → Date_1 and start_date
Say Table_2 has columns → date_options
A table element exists that is displaying the data from Table_1 and say that editing this element allows the user to add values to column “start_date”, which is based on a valueOptions defined as
valueOptions:{
“column”: “start_date”,
“source”: “table_2”,
“valueColumn”: “date_options”
“allowNewValues”: false
}
would it be possible to make it so that,
valueOptions:{
“column”: “start_date”,
“source”: “table_2”,
“valueColumn”: “date_options”,
sourceOptions: {
“sql”: "select date_options from inputTable where date_options>Date_1 " //where Date_1 is from the original table
},
“allowNewValues”: false
}