Difference between revisions of "Database Views"
From AgileApps Support Wiki
imported>Aeric |
imported>Aeric |
||
Line 4: | Line 4: | ||
==About Database Views== | ==About Database Views== | ||
A Database View lets you define a complex data model, by specifying a ''join'' across | A Database View lets you define a complex data model, by specifying a ''join'' across [[Related Objects]]. Reports based on that Database View can then select fields from each of the objects, providing greatly augmented reporting capability. | ||
==Working with Database Views== | ==Working with Database Views== |
Revision as of 23:15, 22 July 2011
Designer > Data > Database Views
Reports are created by extracting data from the platform, in the form of a Database View.
About Database Views
A Database View lets you define a complex data model, by specifying a join across Related Objects. Reports based on that Database View can then select fields from each of the objects, providing greatly augmented reporting capability.
Working with Database Views
Users that have the Customize Objects permission can create a Database View
- Considerations
-
- Database Views can be used to build Reports or Web Tabs
- Edits to a Database View are only allowed after checking against existing reports
- Fields can be removed from the Database View for various reasons - an object can be removed and replaced with a new object or a new set of fields can be selected
- If any fields that are being removed are used in reports based on this Database View, the edits to the Database View will not be allowed; You will have to remove the fields from the affected reports before completing the edit on this Database View
Create or Edit a Database View
To create or edit a Database View:
- Click Designer > Data > Database Views
- Choose one of the following options:
- Click the [New Database View] button to create a new Database View
- Click the name of the Database view to edit
- In the Select tab, specify the objects to use in the Database View. (more below)
Note: At least two objects must be selected. - Click [Next]
- In the Joins tab, define the relationship (Joins) between the selected objects. (more below)
- Click [Next]
- Give the database View a name.
- Click [Save]
Select Tab
Start by selecting objects to participate in the view.
- Select Objects to Join
- Select the desired Objects by moving them to the Selected Objects column).
(You need to select one, at a minimum. But typically the reason for creating a Database View is createa join of several objects.)
- Filter by Record Ownership
- For each selected object use the Checkbox icon to enable filtering by record ownership when creating a Report.
- Custom Aliases
- This section is relevant only to programmers, who may need to reference the alias (name) for an object in a Database View when using one of the platform APIs.
- The alias fields are auto-populated with default values, but can be changed as needed to make programming easier:
- The default alias a System Object is the object name.
(These aliases rarely need to be changed.) - The default alias for a System Object is custom_{numeric_object_ID}
These aliases are routinely changed to something more readable, when programmers access them using APIs. Otherwise, they can be left alone.)
- The default alias a System Object is the object name.
- The alias fields are auto-populated with default values, but can be changed as needed to make programming easier:
Joins Tab
Create New Reports Using a Database View
To create a new report using a Database View
- Create a Database View that includes the Related Objects of interest
- From the application, click the Reports tab.
- Click [Add Report]
- In the Category tab, choose the Database View
(Database Views are shown along with the standard single-object report categories.) - The field list for the report includes all fields available in the objects that part of the Database View.
- Learn more: Add or Edit a Report
Delete a Database View
To delete a Database View:
Considerations
- In order to delete a Database View, you must first delete any report that uses that category; If a Database View is used in any report, and you attempt to delete the Database View, you will get an error message
- The report(s) must be deleted first, then the Database View can be deleted
- If a Database View is used in a report and you attempt to delete the Database View, you will get an error message