Creating a non-auto select view using the Database Configuration application
RachelJarvie 270003D8PQ Comments (2) Visits (7750)
One of the ways to create a non-auto select view in Maximo is to first create a native view on the Maximo database. This will give the Database Configuration application access to the native database's view metadata. The Database Configuration application will import the view but it will only populate the maxobjectcfg, maxviewcfg, and maxattributecfg (NOT maxviewcolumncfg) tables. The view will be treated as read only and Maximo does not support configuring the view in the Database Configuration application other than simply importing it.
An area of importance when creating your view on the native database is to ensure a space is before and after the 'select', 'from' and 'where' key words. If you use only the enter/return key before or after either word instead of a space, the application will not be able to parse the view correctly. This currently pertains to Base Services 22.214.171.124 and prior releases.
Here is an example of how to create a non-auto select view using the import feature.
Go to your database tool and create your view using the correct SQL syntax for your database type. (This is an example for DB2)
create view MYPERSONGROUPVIEW as select person.personid as personid , person.status as status ,person.displayname asdisplayname ,person.firstname as firstname ,person.lastname as lastname ,per
Once the view has been created on the database, go to the Maximo Database Configuration application and create a new object. Enter the exact name of the view you created on the database in the Object field, per our example, MYPERSONGROUPVIEW. If the view was found on your database the 'Imported?' box will be checked. Also, if the application was able to parse the view, the 'View Select' and 'View From' will be populated. The 'View Where' will be populated if a where clause is part of your view. Enter the name of the object you wish to extend in the 'Extends Object' field. In this case I enter PERSON. Next, select the 'Attributes' tab to confirm that only the columns listed in the 'View Select' are populated in the list. If all the above is satisfied then select 'Save Object' from the toolbar.
At this point you should be able to put Maximo in Admin Mode and Apply Configuration Changes.
Once the object has been created, any changes to the view must be made on the native database. You cannot alter an imported view from Maximo. If the view has been altered on the database, in any way, then the corresponding object in Maximo must be deleted and re-created using the steps above.