SQL Data Source Designer¶
SQL data sources are based on a database view.
When creating a SQL data source , properties in following sections need to be defined.:
- Data
- Columns
- Information
Data¶
This section includes following configuration settings:
Property | Description |
---|---|
Name | The name of the Data Source |
View | The database view used to create the Data Source |
Condition | The condition to be used for the 'WHERE' section in the query. Here it is possible to use Page Parameters defined in the Page Properties Configuration dialog. E.g. Company = $COMPANY$. Remember to append the $ sign. |
Group By | The column to be used to group the data |
Order By | The column to be used to order the data |
¶
Figure: Example Definition
Columns¶
This section is used to manage which columns to use from the view. You can add columns, remove columns and re-arrange the order of the columns.
Property | Description |
---|---|
Column | This shows the selected column name as it appears in the database table. |
Name | Users can define an alias for the selected column and this Name is used to refer the selected column for the rest of the lobby designers. |
Data Type | This indicates that, what is the data type of the selected column and the most of the cases it automatically detect by the application. Note : If the data type of the selected column is Date Time type then users need to select the data type from the dropdown. Then only the column is treated as Date Time type for the rest of the lobby designers. |
Figure: Columns Section
There are two options to add a column.
- Click Add button and a new row will be created where you can manually type Column, Description and select Type.
- Click View Columns button which opens the column chooser dialog. All available columns in the view are displayed in the left side of the dialog, select a column and click on the swap button in the middle to add it.
¶
Figure:Column Chooser
Information¶
In this section you can see/modify the author of the data source, define key words to make it easier to find the data source in the Data Source Designer and write a text with additional information about the page etc. The following is available:
Property | Description |
---|---|
Component | Component of the Data Source (By Default it will be 'CONFIG') |
Author | Author of the Data Source |
Keywords | Keywords which can be used when searching for the Data Source |
Descriptive Text | Description about the Data Source |
Last Modified | Last Modified Date and Time of the Data Source |
Copied From | If the Data Source is a copy of another Data Source, this field shows the name of the Original Data Source |
Figure: Information Section
How To Use User Defined View In SQL Data Sources¶
In here we are trying to address the user case that, The users need to insert a new View to the database and use that View to create a new SQL Data Source. For this, need to do some pre arrangement before it uses in SQL Data Source Designer.
prerequisite : Install IFS Developer Studio and connects to relevent Database.
-
Open IFS Developer Studio IDE and open any .veiws file. Then you will see the section called
------PUBLIC VIEW DEFINITIONS-------
. -
Write the code that will create a new view in the database under that section. Ex: here we create a view with the name "Closed_Shop_Ord_View".
-
Then right click on the .views file and click on "Generate Code And Deploy ". If the view is successfully deployed to the database, you will get the message like below.
-
Then login to the IFS Cloud and navigate to the page called "Refresh Server Cache" which is under the navigation entry
"Solution Manager" > "System Information and Utilities".
-
Select the list item "Dictionary" and click on "Refresh Cache" button. Once you click, will appear a dialog box and then press "Ok". This will refresh the Dictionary cache and rebuild.
-
To check the build status, in the same page("Refresh Server Cache" page) select the "Dictionary" item and click the "Background Jobs" button. That will navigate you to a new page and will display the current building state of the selected cache. The status will change "Posted" > "Executing" > "Ready" respectively. To get the latest state of the build, click on the page refresh button from time to time.
-
Once after the status is set to "Ready", you are ready to use the created view in the Data Source Designer.