I have a combobox in a grid, that is dependent to the values of another field in the grid. I also have a universal action to requery the listdatasource on each combo box each time the combobox is getting the focus. Doing this I am 100% sure that each combo box has the latest updated data available. The simplest solution is to use a parameter and write another action only for this combobox, but I am trying to keep actions at minimum, so I thought that is a good idea to get the value of the field by using api_datasource.getcolumnvalue in the where clause of the query. But the query cannot be parsed. Can I use api_datasource.getcolumnvalue functions in queries or the are doing doing DML operations? Thank you. |
I created a new datasource using the following query:
1) I modified the query to:
2) I created a table to map the required parameters of datasources to fields:
3) Created a procedure to apply the binding:
And finally call this procedure before api_datasource.executeQuery.It works very well for any datasource. So my refreshComboDatasource is like this:
I hope my solution to be usefull to someone.... |
Hi Vlisidis, You can use api_datasource.getColumnValue API in the queries of Datasource Definitions. We generally use bind variables in order to pass parameters to the Datasource Definition queries. If you send your query and where clause, we can take a look at it. |