In this tutorial, your focus will be on enhancing the search experience and crafting a refined and efficient navigation system.

Learning outcomes

Learning track

This tutorial is the sixth unit of the Data Authoring track. Make sure to complete the first five units before starting this tutorial:

If you have not completed these prerequisites, return to the Tutorials menu.

GO TO TUTORIALS

Also, if you have not already done so, click the button below to download resources such as the images and data sets that will be used within this tutorial.

DOWNLOAD TUTORIAL RESOURCES

In this section, you will discover the search capabilities of Semarchy xDM and learn how to create a custom search form for the Employee entity and the Global Search.

Learning outcomes

Built-in search types

xDM provides built-in search types that you can customize as accessible search options in your business views.

Built-in search types include:

Next, you will create a custom search form.

Offering users a personalized search experience through custom search forms typically proves very effective.

Search forms enable you to define search criteria for users to filter data. They utilize these criteria to build a SemQL condition that applies the desired filter.

Search parameters may manifest as text fields, checkboxes, date pickers, static drop-down lists, or dynamic value pickers.

In the next sections, you will learn how to build your first search form and enhance the Global Search with a second search form.

Create the Employee search form

In this section, you will build an employee search form to help your users be more productive when filtering data.

The form will have four parameters:

Building such a search form involves incorporating parameters into the form; creating a SemQL condition utilizing these parameters; and eventually exposing this form within your business view.

Define the SemQL search condition

The filter applied by your form is a SemQL condition that will use each parameter as a bind variable to filter the appropriate records.

This condition will use four parameters:

(/* 1. search in first name, last name, title and education records */
(:SEARCH_STRING is null)
or (lower(FirstName) like '%' || lower(:SEARCH_STRING) || '%')
or (lower(LastName) like '%' || lower(:SEARCH_STRING) || '%')
or (lower(FirstName ||' '|| LastName) like '%' || lower(:SEARCH_STRING) || '%')
or (lower(Title) like '%' || lower(:SEARCH_STRING) || '%')
or (any EducationRecords have (
          (lower(DegreeReceived) like '%' || lower(:SEARCH_STRING) || '%')
       or (lower(School) like '%' || lower(:SEARCH_STRING) || '%')
       )
    )
)
(    /* 2. Filter by department */
       (:DEPARTMENT is null)
    or (FID_Department = :DEPARTMENT)
)
(    /* 3. Exclude contractors eventually */
    (:EXCLUDE_CONTRACTORS is null)    
    or (:EXCLUDE_CONTRACTORS = '0')
    or (:EXCLUDE_CONTRACTORS = '1' and IsContractor = '0')
)
(    /* 4. Keep active employees only */
    (:ACTIVE_ONLY is null)
    or (:ACTIVE_ONLY = '0')
    or (:ACTIVE_ONLY = '1' and EndDate is null)
)

You will use this SemQL condition in the next section.

Add the search form

You will now configure a new search form for the Employee entity.

  1. Open the HRTutorial model in the Application Builder.
  2. Navigate to Entities > Employee in the Model Design view. Right-click Search Forms and then select Add Search Form.

  1. Leave all default properties in the dialog and then click Finish.

  1. In the Search Parameters section, click the Add Search Parameter button.

  1. In the dialog, enter the following values and then click Finish:

  1. Click again the Add Search Parameter in the editor.
  2. Enter the following values and then click Finish:

  1. Select the Department parameter in the Search Parameters table.
  2. Select the Display Properties finger tab of the Properties view and then enter the following values:

  1. Click again the Add Search Parameter button in the editor.
  2. Enter the following values and then click Finish:

  1. Select the ExcludeContractors parameter in the Search Parameters table.
  2. Select the Display Properties finger tab of the Properties view, and set Display Type to Checkbox.

  1. Click again the Add Search Parameter button in the editor.
  2. Enter the following values and then click Finish:

  1. Select the ActiveOnly parameter in the Search Parameters table.
  2. Select the Display Properties finger tab of the Properties view, and then set Display Type to Checkbox.

  1. In the Name and Definition section of the editor, click the Edit Expression button next to the SemQL Condition property.

  1. Paste the following SemQL Condition and then click OK.
(
   /* 1. search in first name, last name, title and education records */
(:SEARCH_STRING is null)
or (lower(FirstName) like '%' || lower(:SEARCH_STRING) || '%')
or (lower(LastName) like '%' || lower(:SEARCH_STRING) || '%')
or (lower(FirstName ||' '|| LastName) like '%' || lower(:SEARCH_STRING) || '%')
or (lower(Title) like '%' || lower(:SEARCH_STRING) || '%')
or (any EducationRecords have (
          (lower(DegreeReceived) like '%' || lower(:SEARCH_STRING) || '%')
       or (lower(School) like '%' || lower(:SEARCH_STRING) || '%')
       )
    )
)
and (
    /* 2. Filter by department */
       (:DEPARTMENT is null)
    or (FID_Department = :DEPARTMENT)
)
and (
    /* 3. Exclude contractors eventually */
    (:EXCLUDE_CONTRACTORS is null)    
    or (:EXCLUDE_CONTRACTORS = '0')
    or (:EXCLUDE_CONTRACTORS = '1' and IsContractor = '0')
)
and (
    /* 4. Keep active employees only */
    (:ACTIVE_ONLY is null)
    or (:ACTIVE_ONLY = '0')
    or (:ACTIVE_ONLY = '1' and EndDate is null)
)

  1. Save your work.

Assign the search form

You will now assign the search form to the Employee business view.

  1. Navigate to Entities > Employee > Business Views in the Model Design view and then double-click Employee.

  1. In the Transitions section of the editor, select EmployeeEO in the table view.
  2. Select the Display Properties finger tab of the Properties view, and then click the Edit button next to the Search Configurations property.

  1. Select the Employee Search Form(Custom) in the Available column.
  2. Move it to the first position using the Move Up button and then click OK.

  1. Save your work.
  2. In the Application Builder, right-click on the root node in the Model Design view, corresponding to the HRTutorial [0.0] model, and then select Validate.
    The validation report should raise no error.

You will test your form in the next section.

Use the Employee search form

After designing your search form, you will now refresh your application to see your changes and then test different search combinations.

  1. Open your application from the Welcome page.

  1. Open the user menu on the top-right corner, and then select Refresh Application.

  1. Select Employees in the navigation drawer.
  2. Click the Filter button above the Employees collection to open the filter panel.
    The employee search form you created is selected by default.

  1. Type champion in the Search for field and then click Apply.

  1. Select Reset to clear the search results.

  1. Type oxford in the Search for field and then click Apply.

  1. Select Reset to clear the search results.

  1. Type amit banda in the Search for field and then click Apply.

  1. Select Reset to clear the search criteria and results.

  1. Type Consulting in the In Department field and then select Apply.

  1. Select Exclude Contractors? and then click Apply.

  1. Select Active Only? and then click Apply.

  1. Save your search criteria by selecting Save as. You will be able to reuse it later.

  1. Name your filter Consultants (active) and then select Save.

  1. Share this filter with other users: open the Options menu next to your filter and then click Share.

Combine filters

You will now create another filter to learn how to combine filters.

  1. Select New filter.

  1. Set the Search type to Advanced and then select Add criterion.

  1. Enter the following values and then click Add:

  1. Select Save as.

  1. Set the filter name to After 2012 and then select Save.

  1. Click Apply and observe that the new filter returns only four records.

  1. Click the toggle next to the After 2012 filter to the off position, and click Apply.
  2. Observe that the search returns eight records now that this filter is disabled.

Congratulations!

You have successfully created and used a custom search form for employees' records. Next, you will learn how to use a search form in the Global Search.

If you use the Global Search feature and try to search for a person's full name, no results will be retrieved. This is because Global Search scans individual attributes like first name or last name, but not their concatenation.

You are now going to examine the Global Search as it was configured initially in the first unit, Build your first data authoring application.

  1. In the Employee Tutorial application, select Global Search in the navigation drawer.

  1. Search for richard cameron and click the Search button.

  1. No results are returned by the search because the Global Search configuration does not include searching on the combination of the first name and last name.

To avoid this issue, you will configure the Global Search to use a similar form and the same condition on full name as the search form you created previously.

Create a new search form

  1. Open the HRTutorial model in the Application Builder.
  2. Navigate to Entities > Employee > Search Forms in the Model Design view.
  3. Right-click EmployeeSearchForm and then select Duplicate.

  1. Double-click on the newly created EmployeeSearchForm2 in the Model Design view.

  1. In the Name and Definition section of the editor, enter the following values:

  1. Click the Edit Expression button next to the SemQL Condition property.

  1. Replace the existing SemQL Condition with the following one, and then click OK.
(
   /* 1. search in first name, last name, title and education records */
(:SEARCH_STRING is null)
or (lower(FirstName) like '%' || lower(:SEARCH_STRING) || '%')
or (lower(LastName) like '%' || lower(:SEARCH_STRING) || '%')
or (lower(FirstName ||' '|| LastName) like '%' || lower(:SEARCH_STRING) || '%')
or (lower(Title) like '%' || lower(:SEARCH_STRING) || '%')
or (any EducationRecords have (
          (lower(DegreeReceived) like '%' || lower(:SEARCH_STRING) || '%')
       or (lower(School) like '%' || lower(:SEARCH_STRING) || '%')
       )
    )
)

  1. Select the following Search Parameters in the table view and then click the Delete button:

  1. Save your work.

Modify the Employee business view

You will now edit the Employee business view to add your new search form.

  1. Navigate to Entities > Employee > Business Views in the Model Design view and double-click Employee.

  1. In the Transitions section of the editor, select EmployeeEO in the table view.
  2. Select the Display Properties finger tab of the Properties view, and then click the Edit button next to the Search Configuration property.

  1. Select the Customized Text Search in the Available column and move it to the second position in the list using the Move Up button.
  2. Deselect Text(Built-in) and then click OK.

  1. Save your work.

Modify the Global Search configuration

You will now modify the Global Search configuration to replace the search type used for employees with your new search form.

  1. Navigate to Applications > EmployeeTutorial in the Model Design view and then double-click Global Search Configuration.

  1. In the Searched Business Views section of the editor, select Employee in the table view, and then set the Search Type to Customized Text Search.

  1. Set the Search Parameter to SearchString.

  1. Save your work.
  2. In the Application Builder, right-click on the root node in the Model Design view, corresponding to the HRTutorial [0.0] model, and then select Validate.
    The validation report should raise no error.

Test the enhanced Global Search

It is now time to test your new search form.

  1. Open your application from the Welcome page.

  1. Open the user menu on the top-right corner, and then select Refresh Application.

  1. Select Global Search in the navigation drawer.

  1. Search for richard cameron and click the Search button.

  1. The Global Search is now able to retrieve an employee when you type in a full name.

  1. Try other searches:

Your Global Search is now configured to be more flexible.

Congratulations!

You have successfully enhanced the user experience by adding search forms to your application.

To summarize:

The next section of this tutorial will focus on improving the look and feel of your application.

Now, you will focus on enhancing the user-friendliness of your application.

Your application relies on a folder structure and a navigation drawer located on the left side of the interface. The next sections will guide you through optimizing their content to make your application more user-friendly.

Learning outcomes

Semarchy xDM allows you to load and store images into image libraries and access the images with a URL. The images can then be assigned to folders, actions, cards, etc.

In this section, you will learn how to create a new image library and import some images from the data-authoring\pictures folder of the tutorial resources.

  1. Select Configuration on the Welcome page.

  1. Scroll down to Application Customization and click Image Libraries.

  1. Click the Import Image Library button to open the import wizard.

  1. Click Add to load the image files provided in the tutorial resources.
  1. Select all the files in the data-authoring\pictures\image-library folder of the tutorial resources, and click Open.
  2. Once the files are loaded, set the Target Library to Create a new library.

  1. Set the Name to employee-tutorial and click OK.

  1. Click OK to complete the image library creation.

  1. The images are now available for your application.

Congratulations!

You have successfully created an image library. You will use the images stored within it in the upcoming sections.

Semarchy xDM allows you to adapt the applications to your brand image and guidelines.

  1. In the Application Builder, open the HRTutorial model.
  2. Expand the Applications > EmployeeTutorial node and open EmployeeTutorial.

  1. In the Branding section, set the images in the following fields:

  1. In the Display Properties section, set the Sort Method to Position.

  1. Save your work.

See your changes in action

  1. Open the application from the Welcome page.

  1. In the user menu on the top-right corner, click Refresh Application.

  1. Notice that the logo of the homepage has been updated with the application logo.

  1. The navigation drawer has been updated with the application cover.

  1. The avatar has been updated with the application avatar.

  1. The browser favicon has been updated with the application favicon.

  1. Go back to the Welcome page to see that the application avatar is also used here.

Congratulations!

You have configured the branding for your application. Next, you will enrich your application with a new business view.

So far, you can browse your employee data through the Employees business view or the Org. Chart business view.

The goal of this section is to have you add the Contractors view with a predefined filter on contractors.

  1. In the Application Builder, open the HRTutorial model.
  2. Expand the Entities > Employee > Business Views node, right-click Employee and click Duplicate.

  1. Open the newly created Employee2 business view.

  1. Select Auto Fill and set the Name to Contractors.

  1. Next to the Root Filter property, click the Edit Expression button.

  1. Enter the following SemQL expression and click OK.
IsContractor = '1'
  1. Save your work.
  2. In the Application Builder, right-click the root node in the Model Design view, corresponding to the HRTutorial [0.0] model, and click Validate.
    The validation report should raise no error.

Congratulations!

You have successfully added a new business view to your application. Later, you will add this business view as an action from your folders menu.

Next, you will configure folders and actions.

In the next sections, you will be guided to create a folder structure, as shown in the image below.

The root folder of your application will contain two folders:

Remove the unused actions

You will start by removing unused actions from the navigation drawer.

  1. In the Application Builder, open the HRTutorial model.
  2. Expand the Applications > EmployeeTutorial node and open Folders and Actions.

  1. In the Folders and Actions table, delete:

Rename the Global Search feature

In the Folders and Actions table, select GlobalSearch and set the Label to Search.

Configure new folders and actions

You will now add folders and actions to your application.

Create the TakeAction folder

  1. In the Folders and Actions table, select Root and click Add Folder.

  1. Enter the following values and click Finish:

  1. In the Folders and Actions table, select TakeAction, select the Display Properties finger tab in the Properties view, and set the Icon Color to md:green.

  1. Drag the TakeAction folder and drop it between MyTasks and BrowseDepartment.

  1. In the Folders and Actions table, reselect the TakeAction folder, and click Add Action.

  1. Enter the following values and click Next:

  1. Set the Action to EmployeeActionSet > CreateAuthorEmployees [Create Action] and click Next.

  1. Enter the following values and click Finish:

  1. Expand the TakeAction folder and select NewEmployee.

  1. Select the Display Properties finger tab in the Properties view, and set the Resize Mode to Fill.

Add the ImportEmployees action

You will now add a new action to import Employee records.

  1. In the Folders and Actions table, select TakeAction and click Add Action.

  1. Enter the following values and then click Next:

  1. Set the Action to EmployeeActionSet > ImportAuthorEmployees [Import Action] and click Next.

  1. Enter the following values and click Finish:

  1. Select the ImportEmployees action.

  1. Select the Display Properties finger tab in the Properties view and set the Resize Mode to Fill.

Add the NewDepartment action

Now, you will create a third action to create a Department record.

  1. In the Folders and Actions table, select TakeAction and click Add Action.

  1. Enter the following values and click Next:

  1. Set the Action to DepartmentActionSet > CreateAuthorDepartments [Create Action] and click Next.

  1. Enter the following values and then click Finish:

  1. Select the NewDepartment action.

  1. Select the Display Properties finger tab in the Properties view, and then set the Resize Mode to Fill.

Add the Browse folder

You will now create the Browse folder.

  1. In the Folders and Actions table, select Root, and click Add Folder.

  1. Enter the following values and click Finish:

  1. In the Folders and Actions table, select Browse.
  2. Select the Display Properties finger tab in the Properties view and set the Icon Color to md:blue.

  1. Move the Browse folder between TakeAction and BrowseDepartment using the Move Up button.

  1. Select BrowseDepartment, select the Display Properties finger tab in the Properties view and enter the following values:
  1. Select BrowseEmployee, select the Display Properties finger tab and enter the following values:
  1. Select BrowseOrgChart, select the Display Properties finger tab in the Properties view and enter the following values:

Add the BrowseContractors action

You will now create a new action to browse contractors using the Contractors business view you created earlier.

  1. In the Folders and Actions table, select Browse and click Add Action.

  1. Enter the following values and click Next:

  1. Set the Business View to Contractors and click Next.

  1. Enter the following values and click Finish:

  1. Expand the Browse folder.

  1. Select BrowseContractors
  2. Select the Display Properties finger tab of the Properties view and set the Resize Mode to Fill.

  1. Drag and drop the following actions into the Browse folder:

  1. Order the actions in the Browse folder as below with the Move Up and Move Down buttons:

  1. Save your work.
  2. In the Application Builder, right-click on the root node in the Model Design view, corresponding to the HRTutorial [0.0] model, and click Validate. The validation report should raise no error.

Congratulations!

You have configured the folder structure and application actions.

Next, you will configure the navigation drawer.

The goal of this section is to configure the navigation drawer (i.e., the main menu) of your application.

The menu will have four items:

To build the navigation drawer for your application, follow these steps:

  1. In the Application Builder, open the HRTutorial model.
  2. Expand the Applications > EmployeeTutorial node and open navigation drawer.

  1. In the Groups section, delete RootFolder.

  1. Click Add Group.

  1. Enter the following values and click Finish:

  1. Select SearchAndInbox, and click the Add Item button.

  1. Set the Action to Search [Global Search] and click Finish.

  1. Expand SearchAndInbox and click Add Item.

  1. Set the Action to MyTasks [My Tasks] and click Finish.

  1. Select Add Group in the Groups section.

  1. Set the Name to Employees and then click Finish.

  1. Select Employees in the Groups table view and then click Add Item.

  1. Set the Action to TakeAction [Folder] and then click Finish.

  1. Select and expand Employees in the Groups table view, and then click Add Item.

  1. Set the Action to Browse [Folder] and then click Finish.

  1. Save your work.
  2. In the Application Builder, right-click on the root node in the Model Design view, corresponding to the HRTutorial [0.0] model, and then select Validate. The validation report should raise no error.

Congratulations!

You have successfully configured your application's navigation drawer.

It is now time to see your changes reflected in your application.

You can now see the results in the application.

  1. Open your application from the Welcome page. Notice the updated avatar.

  1. Open the user menu on the top-right corner, and then select Refresh Application.

  1. The navigation menu has been updated. Select Take Action.

  1. The menu offers the following actions:

  1. Select Browse in the navigation drawer.

  1. The menu offers the following actions:

Congratulations!

Good job! The application looks much better for your business users.

Next, you will add some external content to your application.

With Semarchy xDM, you can integrate external content via URLs into your application. You have the option to set up actions within your folders that either launch an external link in a separate browser window or tab, or embed it within the application.

Create the GDPR action

Now, you will incorporate a hyperlink to an external resource regarding the GDPR.

  1. Open the HRTutorial model in the Application Builder.
  2. Navigate to Applications > EmployeeTutorial in the Model Design view and double-click Folders and Actions.

  1. Select Root in the Folders and Actions table and then select Add Action.

  1. Enter the following values and then click Next:

  1. Enter the following value and then click Next:

  1. Finally, enter the following values and then click Finish:

  1. Select GDPR in the table view of the editor.
  2. Select the Display Properties finger tab of the Properties view and then set the Icon Color to md:amber.

  1. Save your work.

Add the GDPR action to the navigation drawer

You will now add the new action to the navigation drawer.

  1. Open the HRTutorial model in the Application Builder.
  2. Navigate to Applications > EmployeeTutorial in the Model Design view and then double-click navigation drawer.

  1. Select Add Group in the Groups section.

  1. Set the Name to ExternalLinks and then click Finish.

  1. Select ExternalLinks in the Groups table view and then click Add Item.

  1. Set the Action to GDPR [Open URL] and then click Finish.

  1. Save your work.
  2. In the Application Builder, right-click on the root node in the Model Design view, corresponding to the HRTutorial [0.0] model, and then select Validate.
    The validation report should raise no error.

See your changes

You can now see the new external link in your application.

  1. Open your application from the Welcome page.

  1. Open the user menu on the top-right corner and then select Refresh Application.

  1. The navigation menu has been updated. Select GDPR.

  1. The GDPR website opens in a new tab.

Congratulations!

You have successfully added an external link to your application.

Excellent job! Throughout this tutorial, you have learned how to customize the search experience, branding, and navigation in your application. You now have a complete and user-friendly application for data authoring.

Learning recap

Next steps

If you have not done so already, you can either follow the Data Consolidation track and create a customer B2B application to consolidate data from various sources, or the Data Publishing & Consumption track to learn how to query and load data via using the SQL and REST APIs.

GO TO TUTORIALS

Thank you for completing this tutorial.