Is there a function in Servoy to get the table name from a column name? Trying to use new createDataSource and we are tired of hand coding all the column types. We can get the column names from a dataset but we can’t find a way to get the column types of those columns. It sure would be great to have getColumnType function that worked on a dataset. We do have one for a table, but not for a dataset which might contain columns from multiple tables. dataset.getColumnType(MyColumnName) is what I’m looking for. Then I can loop through all the columns in a dataset and return a list of column types to pass to createDataSource.
var uri = dataset.createDataSource(‘mydata2’, [DM_COLUMNTYPE.TEXT, DM_COLUMNTYPE.TEXT, DM_COLUMNTYPE.TEXT, DM_COLUMNTYPE.TEXT]);
If we didn’t have to hand code all the DM_COLUMTYPE.TEXT entries we can write a ‘universal’ function to handle all the different dataset we need to build, instead of each one being hand coded.
Gary