Chat now with support
Chat with Support

Identity Manager 8.0 - Web Designer Reference Guide

Web Designer Editor Web Designer Structures and Functions The Web Designer Object Model Working with the Web Designer Web Project Configuration Options Customizing the Web Portal Basics of Web Designer Programming Compiling and Debugging Monitoring Frequent Tasks in the Web Portal

Working with a Database based Collection

Working with a database based collection includes adding properties or object as well as removing and delete objects from a collection or database.

All important procedures for managing database-based collections are described below:

To add a proxy property to a database based collection

Proxy properties allow transparent use of database columns (base property) with modified metadata. Metadata includes:

  • Name
  • Description
  • Specifying a property as mandatory or optional
  • Structure for displaying the property value
  • Component selection for displaying and editing property values

You can modify a property within a component to match the requirements of the component exactly using proxy properties. Ensure the database of a proxy property is always the base property value. Updating the value through proxy properties always have additional effects on the base property.

  1. Select a collection with a right click.
  2. Select Proxy property.

    A proxy property is added under the selected collection node.

  3. Select a property in the Base property field in the Node editor view.
  4. Enter a name for the proxy property in the Identifier text field.

To add more proxy properties to a database based collection

  1. Select a collection with a right click.
  2. Select the option Property.
  3. Enter at least a name and data type for this property.

NOTE: Each object, which is in the collection at runtime, now has an additional property. You can handle this like a database based property, for example, to store temporary data.

To add a new object to a collection

  1. Select an action node with a right click.

    This could be the Initializer node of the component, for example.

  1. Select Paste and click the newly generated node.
  2. Select the relevant collection under Collection in the Node editor view.
  3. Using the Filter condition property, enter an filter condition expression if you wish.

NOTE: Ensure the object is only added in the collection.

To modify a property in a database-based collection

In the steps below, the display value in the Entry date column in the White pages view is modified from <dd.MM.yy> to <yyyy-MM-dd> as an example.

NOTE: The steps for this function can be used for the Child relation column and Foreign key relation column functions. For more information about these functions, see the One Identity Manager Web Designer Object Model Documentation.
  1. Log in to the Web Portal with your user information and select the White pages view.
  2. Select the corresponding Entry date column, if this is not displayed, and look at the current display value.

    In our example, we presume that the <dd.MM.yy> display value is set.

  3. Click the White pages view title and switch to Web Designer.
  4. Open the Properties view and click to switch to the definition object in the definition tree view.
  5. Open the Collections node using and mark the Person data object.
  6. Select Object in extension | Modify property in the context menu.

    The display in the definition tree view switches to Configuration (custom).

  7. Select EntryDate in the Base property* option field in the node editor view and enter the new display value expression in the Expression for display value text field.

    In our example, the following expression could be used.

    FormatDate(EntryDate, "yyyy-MM-dd")

  8. Switch to preview mode and re-compile the web application.
  9. Select The White pages view and the corresponding Entry date column.

    In the Entry date column, the display value is yyyy-MM-dd.

To remove objects from the collection or delete them from the database

  1. Select an action node with a right click.

    This could be the Initializer node of the component, for example.

  2. Click Delete and select the newly generated node.
  3. Select the relevant collection under Collection in the Node editor view.
  4. Perform one of the following tasks.
    1. Select the value Delete row only from collection under Delete type if you want to delete the object from the collection.
    2. Select the value Delete database object and save under Delete type.
  5. Using the Filter condition property, enter an filter condition expression if you wish.

To save objects in the database

  1. Select an action node with a right click.

    This could be the Initializer node of the component, for example.

  1. Select Save and click the newly generated node.
  2. Select the relevant collection under Collection in the Node editor view.
  3. Using the Filter condition property, enter an filter condition expression if you wish.

Loading Database Object through Relations

Data is linked in a database by relations to each other. You can use these relations to load data from the database in the simplest way.

Prerequisite for using such a collection is a collection containing source data.

There are different type of relations for defining a collection:

  • Defining with a foreign key relation:

    A foreign key relation helps automatically load those objects in a database view that were referenced by objects from another collection through a foreign key relation.

  • Defining with child relation:

    A child relation helps automatically load those objects in a database view that reference objects from another collection through a child relation.

To define a collection with a foreign key relation

  1. Open the module or component to which to add the collection.
  2. Select the Collections node with a right click.
  3. Select the Database view by foreign key relation option.
  4. Select the collection with the source data in Source data collection.
  5. Select the foreign key column to create the relation to the target table in Foreign key column.
  6. Enter the name for the new collection in Identifier.

You do not have to trigger loading for this type of collection. The moment the data is available in the source data collection, the foreign key referenced objects are automatically loaded.

To define a collection with a child relation

  1. Open the module or component to which to add the collection.
  2. Select the Collections node with a right click.
  3. Select the Database view by child relation option.
  4. Select the database table from which to load the objects in Object type.
  5. Select the collection containing the objects to be referenced in Source data collection.
  6. Select the foreign key column to create the relation to the target table in Child relation column.
  7. Enter the name for the new collection in Identifier.

You do not have to trigger loading for this type of collection. The moment the data is available in the source data collection, the referenced objects are automatically loaded.

Loading Database Objects from Multiple Tables

For different use cases, it is necessary to examine database objects from multiple tables together. The special collection type Database objects from multiple tables in the object model is available for this.

To define a collection with the option "Database objects from multiple tables"

  1. Open the module or component to which to add the collection.
  2. Select the Collections node with a right click.
  3. Select the option Database objects from multiple tables.
  4. Enter the name for the new collection in Identifier.

    A collection like this is database based, but can accept objects from multiple database tables.

For more information, see "Database Objects" as a collection. You must explicitly provide the database table from which the objects will be loaded.

Using the Database Query Wizard

NOTE: You can use the database query wizard in a module or component of a collection or when you want to add a new module or component.

You cannot execute SQL expressions directly in Web Designer for security reasons. Instead, this wizard helps you create SQL expressions which are stored in the QBMLimitedSQL table and linked to at least one permissions group in the QBMGroupHasLimitedSQL table. Your own collection node is added for the query.

To create a database query

  1. Perform one of the following tasks.
    1. Select a module or a component in the navigation view.
    2. Create a new module or component.
  2. Mark the Collections node in the Object definition view in the definition tree view and select Wizards | Database query wizard or Object in extension | Wizards | Database query wizard from the context menu.

    NOTE: The navigation depends on whether you have selected a custom module/component or a default module/component. Default database objects first require an object extension. For more information, see Extensions.

    The Wizard for creating or selecting a database query page is displayed for an SQL expression to be entered or selected.

  3. Select the New option.

    This displays following input and text fields are displayed.

    Table 54: SQL expression settings
    Setting Description
    Collection name If necessary, overwrite the standard name for the collection that you are adding with this query.
    Identifier In this input field, enter a unique identifier that is used later to identify the entry.
    SQL expression Enter the complete expression in this text field. You can also declare parameters.
    Description Enter a description of this entry here. This makes it easier for other users to understand and classify this expression.
  4. Configure the settings and click Next.

    Specify the dialog groups that can execute the SQL snippet in the Wizard for creating or selecting a database query page. All dialog groups are selected.

  5. Specify the relevant dialog groups.
    • Disable the relevant dialog group by double-clicking .
    • Disable Select/Deselect all to deselect all listed dialog groups and to enable the relevant dialog groups one by one.
    • Enable the relevant dialog group by double-clicking .
  6. Specify the parameters you wish to select and set the values in the following Wizard for creating or selecting a database query page.
    • If necessary, disable parameter columns you do not want to include in the query or that were recognized by the parser as parameters but are not correct.
    • Disable Select/Deselect all to select parameter columns one by one.
    • Enter a value for the parameter by clicking next to the corresponding parameter column.

    NOTE: You can check your database query with Test statement. As soon as the database processes running in the background are complete, you can test the new expressions.

    This display the Processing page and generates the new collection and SQL expression.

  7. Close the wizard using Finish.

To select a database query

  1. Perform one of the following tasks.
    1. Select a module or a component in the navigation view.
    2. Create a new module or component.
  2. Mark the Collections node in the Object definition view in the definition tree view and select Wizards | Database query wizard or Object in extension | Wizards | Database query wizard from the context menu.

    NOTE: The navigation depends on whether you have selected a custom module/component or a default module/component. Default database objects first require an object extension. For more information, see Extensions.

    The Wizard for creating or selecting a database query page is displayed for an SQL expression to be entered or selected.

  3. Select the Existing option.

    This displays the following input and text fields.

    Table 55: Settings for an existing SQL expression
    Setting Description
    Collection name If necessary, overwrite the standard name for the collection that you are adding with this query.
    SQL snippet Select an existing snippet in the options box that you can then use and edit in the SQL expression field.
    SQL expression If necessary, extend the selected snippet and preset parameters in the text field.
  4. Configure the settings and click Next.

    Specify the dialog groups that can execute the SQL snippet in the following Wizard for creating or selecting a database query page.

  5. Specify the relevant dialog groups.
    • Enable the relevant dialog groups by double-clicking .
    • Disable the relevant dialog group by double-clicking .

      NOTE: Dialog groups already in a standard module collection cannot be deselected.
    • Disable Select/Deselect all to (de)select all listed dialog groups and to enable/disable the relevant dialog groups one by one.
  6. Specify the parameters you wish to select and set the values in the following Wizard for creating or selecting a database query page.
    • If necessary, disable parameter columns you do not want to include in the query or that were recognized by the parser as parameters but are not correct.
    • Disable Select/Deselect all to select parameter columns one by one.
    • Enter a value for the parameter by clicking next to the corresponding parameter column.

    NOTE: You can check your database query with Test statement. As soon as the database processes running in the background are complete, you can test the new expressions.

    This display the Processing page and generates the new collection and SQL expression.

  7. Close the wizard using Finish.
Related Documents