How to use SQL code data source in selection components
This tutorial shows you how to use SQL code as Data source type in selection component. In our example we have form for adding/editing product. Product has Product category attribute, so we will show selection component on this form that is using SQL code as Data source type.
1. Login into developer panel.
2. Navigate to Pages menu item.
3. Select page pageProduct.
4. Drag and drop Singleselect component from all components list to formEditProduct.
5. In component properties section, select SQL code as Data source type. Click on textarea under Data source SQL label and enter SQL code. Result of SQL query should return data from database with Id as first column. First column will be value of selection option and second column will be label of selection option.
6. Click on Save changes, go into your application and check out the results.