Oracle by Example brandingEditing Business Objects with the Data Designer in Oracle Visual Builder Cloud Service

section 0Before You Begin

This 10 minute tutorial shows you how to edit your application's business objects using the data designer.

This is the second and last tutorial in the Working with business objects module. Read the tutorials sequentially.

Background

Oracle Visual Builder Cloud Service is a visual development tool for creating web and mobile applications by simply dragging and dropping user interface (UI) components onto a page. You can create business objects with the click of a button, and you can add data by importing CSV files or XLS spreadsheets to your application. You don't need any programming experience to develop an application.

In this series of tutorials, you will work with business objects in the Human Resources (HR) application that you created in the Create your first application module.

The images in this tutorial sequence show the standalone version of Oracle Visual Builder Cloud Service. If you are using the Oracle Integration Cloud version, you will see an additional menu at the top of each page that lets you switch between Visual Builder and Integration Cloud.

Top menu
Description of the illustration vbcs_oic_menu.png

What Do You Need?

  • Access to Oracle Visual Builder Cloud Service
  • A supported browser (see Known Issues for Oracle Application Builder Cloud Service for more information)

section 1Update a Field in the Data Designer

The Data Designer contains various tools that you use to manage your business objects and data. You can create and delete business objects, add and remove fields from a business object, edit properties of fields, set validation rules, add data to the business objects manually, or import data from CSV files or XLS spreadsheets.

Lookup fields are read-only and cannot be edited or deleted, but you can make them inactive. In this section, you'll use the Data Designer to configure the properties of the Hire Date field of the Employee business object.

  1. Click the Main menu icon in the top left corner and select Data Designer.
    Main menu
    Description of the illustration vbcsebo2_t1_s1.png
  2. Click the Business Objects tile, then select the Employee business object.
    Data Designer
    Description of the illustration vbcsebo2_t1_s2.png
  3. Click the Fields tab.
    Fields tab in Data Designer
    Description of the illustration vbcsebo2_t1_s3.png
  4. Select the Hire Date field. The Edit dialog box is displayed.
    Hire Date field in Data Designer
    Description of the illustration vbcsebo2_t1_s4.png
  5. Select the Set initial value for Create page option.
    Properties box in the Fields tab
    Description of the illustration vbcsebo2_t1_s5.png
  6. Click the Insert drop-down, then select Expression.
    Properties box in the Fields tab
    Description of the illustration vbcsebo2_t1_s6.png
  7. If you are opening the Set Initial Value dialog box for the first time, an overlay product tour will highlight the key components of the dialog box. Click Got it! to close the tour. In the Set Initial Value dialog box, enter $current_date in the text area as the initial value, and click OK.
    Set Initial Value dialog box
    Description of the illustration vbcsebo2_t1_s7.png
    The $current_date variable inserts the current date.
  8. In the Properties pane, click Validation Rules.
    Properties box in the Fields tab
    Description of the illustration vbcsebo2_t1_s8.png
  9. Click + Add Rule.
    Properties box in the Fields tab
    Description of the illustration vbcsebo2_t1_s9.png
  10. In the Date Validation Rule drop-down list, select Date Range.
    Validation Rule dialog box
    Description of the illustration vbcsebo2_t1_s10.png
  11. In Value 1, enter '1990-01-01'. Remember to add quotes when you enter the value in Value 1. In Value 2, enter $current_date. Click OK.
    Validation Rule dialog box
    Description of the illustration vbcsebo2_t1_s11.png
  12. Click Save to save your changes, then click the Edit icon (the pencil) to close the properties pane.
    Save button
    Description of the illustration vbcsebo2_t1_s12.png
  13. Click Main menu in the top left corner and select Page Designer.
    Main menu
    Description of the illustration vbcsebo2_t1_s13.png
  14. Click the Test Application button in the toolbar.
  15. In the Employees page, click Create.
  16. In the Add Employee page, the Hire Date field shows the current date as the default value. Delete the current date and enter a date value before Jan 01, 1990 or after the current date to verify the validation rule.
    Create Employee page in Test Application mode
    Description of the illustration vbcsebo2_t1_s16.png
  17. Click Cancel, then click Back to Designer to return to the Page Designer.

section 2Import Data From a File

In the Getting Started with Oracle Visual Builder Cloud Service tutorial, you imported data from a CSV file to the Employee business object. In this section, you'll learn how to import data from CSV files to all business objects of the application.

Note: You cannot add new fields to a schema or edit their properties by importing data from a CSV file. The names and data types of columns in the CSV file must match the names and data types of columns in the schema.

  1. Download the HR_Application.zip file to your machine. Right-click this link and choose Save As to download the zip file. The zip file contains CSV files for the business objects of the HR Application. Feel free to review the contents of the zip file.
  2. Click the Main Menu icon in the top left corner and select Data Designer.
    Main menu
    Description of the illustration vbcsebo2_t2_s2.png
  3. Click the Data Manager tile.
    Data Manager tile
    Description of the illustration vbcsebo2_t2_s3.png
  4. The Data Manager page contains tools for copying data between your development, staging, and live databases and for importing and exporting data files. Ensure that Development is selected in the Database menu, then click the Import from File tile.
    Import from File tile
    Description of the illustration vbcsebo2_t2_s4.png
  5. In the Confirm Import Data dialog box, click Upload a file, browse, and select the HR_Application.zip file.
    Confirm Import Data dialog box
    Description of the illustration vbcsebo2_t2_s5.png
  6. Click Import.
  7. In the Import from File dialog box, click OK.
    Import from File dialog box
    Description of the illustration vbcsebo2_t2_s7.png

section 3View the Imported Data

  1. Click Main menu in the top-left corner and click Page Designer, then, if necessary, open the page menu and select Employees.
  2. Click the Test Application button and see the imported data in the Employees page of the application.

    Tip: You may need to do a hard refresh (control-R) and/or clear the browser cache to see the latest data of the application, and you may need to select the Desktop or Widescreen canvas area to see all the Employee fields without scrolling.

    Test Application mode
    Description of the illustration vbcsebo2_t3_s2.png
  3. Click the Departments tab. The departments are on different floors from when you created them.
    Test Application mode
    Description of the illustration vbcsebo2_t3_s3.png
  4. Return to the Employees page and switch the canvas view to Phone portrait. Because of the way you set the responsive properties in the Editing an Application tutorial, the Email and Hire Date columns aren't visible, but the new Job and Address fields are visible if you scroll. Switch to other canvas views to see how the fields appear in the table.
    Test Application mode
    Description of the illustration vbcsebo2_t3_s4.png
  5. Click Back to Designer.
  6. If you want to, click the user menu in the top right corner of Oracle Visual Builder Cloud Service and select Sign Out from the menu.

more informationWant to Learn More?