Div | ||
---|---|---|
| ||
The following example walks through the process of creating a Domain based on Course data. For a video guide, see the end of this walkthrough or click the Tutorial link in the Domain block of the Analytika™ Home Zoola™ Home page.
To create your sample Domain, complete the following steps:
Span class color: #000000; From the Home page, select either Create > Domain, or click the Create link in the Domain block. The Add New Domain page opens. Span style color: #000000; In the Name field, enter "Course Categories." Span style color: #000000; In the Resource ID field, accept the automatically generated ID. Span style color: #000000; In the Description field, you option of entering a description. Span style color: #000000; Below the Save Location field, click the Browse button to open the Choose the destination folder dialog box. Span style color: #000000; If you wish to save your example Domain, select your Domains folder, then click the Select button. Span style color: #000000; Below the Data Source field, click the Browse button to open the Select Data Source dialog box. Span style color: #000000; Navigate to Public > Totara > Data Sources > Totara and click the Select button. Span style color: #000000; Below the Domain Design heading, click the Create with Domain Designer link to launch the Domain Designer. Span style color: #000000; From the Data Source panel, select the following tables and drag/enter them into the Selected Tables panel: Span style color: #000000; "mdl_course" Span style color: #000000; "mdl_course_categories"
Span style color: #000000; Click the Derived Tables tab, where you can enter SQL queries to define custom tables based on specified data from the data source. Span style color: #000000; To create a derived table, complete the following steps: Span style color: #000000; In the Query ID field, enter a name for the query (using no spaces)—"CustomTableCourseFullname" will suffice for this sample. Span style color: #000000; In the Query field, begin you query by entering "select." Span style color: #000000; In the Available objects panel, select the fullname column and enter it into your query by double-clicking it. Span style color: #000000; In the Query field, continue your query by entering "from." Span style color: #000000; In the Available objects panel, select the "mdl_course" table and enter it into your query by double-clicking it. Your query should now appear as: select fullname from mdl_course;
Span style color: #000000; Click the Run Query button. Span style color: #000000; Click the Save Table button—"Custom TableCourseFullName" now appears in the Available objects panel. Tip icon false You may not wish to save this custom table - to delete it, select the table and click the Delete button from the Designer tool bar.
Span style color: #000000; Click the Joins tab, where you can join tables to be presented together in your report. Span style color: #000000; To create a join, complete the following steps: Span style color: #000000; In the Left Table panel, expand the "mdl_course" table and select the category column. Span style color: #000000; In the Right Table panel, expand the "mdl_course_categories" table and select the Id column. Span style color: #000000; Select the Inner Join button icon, so that join results contain only rows where values in the chosen columns are equal.
Span style color: #000000; Click the Calculated Fields tab, where you can create fields with information dependent on variable data. Span style color: #000000; To create a calculated field, complete the following steps: Span style color: #000000; In the Field Name field, enter a name for the calculated field—"CourseNameID" will suffice for this example. Span style color: #000000; From the Type list, select "String" as the datatype for the calculated field. Span style color: #000000; In the Expression field, begin your expression by entering "concat(" Span style color: #000000; In the Available Fields panel, locate the "fullname" column of the "mdl_course" table and double-click it to enter it into your expression. Span style color: #000000; In the Expression field, continue your expression by adding a comma and a space: ", " Span style color: #000000; In the Available Fields panel, locate the "Id" column from the "mdl_course" table and double-click it to enter it into your expression. Span style color: #000000; In the Expression field, finish your expression by adding a closing parentheses.
Span style color: #000000; Click the Pre-Filters tab, where you can create and apply filters to reduce the data displayed in the Domain. Span style color: #000000; To create a pre-filter, complete the following steps: Span style color: #000000; In the Fields panel, select the "name" column from the "mdl_course_categories" table. Span style color: #000000; Enter the name column into the Filter panel by double-clicking it. Span style color: #000000; In the Filters panel, select "equals" from the "name" list as the conditional operator. Span style color: #000000; In the adjacent field, enter "corporate" as the filter value. Span style color: #000000; Click the OK button to save the filter.
Span style color: #000000; Click the Display tab, where you can specify which columns and calculated fields to display to users through the Domain. Span style color: #000000; To modify display properties, complete the following steps: Span style color: #000000; In the Resources panel, select "Jointree_1" Span style color: #000000; Add "Jointree_1" to the [Sets and Items] panel by clicking the [Add to Sets] button. Span style color: #000000; In the Sets and Items panel, expand the "mdl_course" set and select the "Id" item. Span style color: #000000; In the Properties panel, click the Edit button. Span style color: #000000; In the Label field, modify the "Id" name to "CourseID". Span style color: #000000; To save your modification, click the Save button.
Span style color: #000000; Click the OK button to save the Domain Design.
...
Div | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||
|
...
...
id | RelatedTopics |
---|
...