IBM Support

Creating a non-auto select view using the Database Configuration application

Technical Blog Post


Abstract

Creating a non-auto select view using the Database Configuration application

Body

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 7.5.0.5 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 ,person.addressline1 as addressline1 ,person.city as city ,person.stateprovince as stateprovince ,person.country as country ,person.postalcode as postalcode ,person.personuid as personuid ,person.rowstamp as rowstamp ,persongroupteam.resppartygroup as resppartygroup ,persongroupteam.respparty as respparty ,persongroupteam.resppartygroupseq as resppartygroupseq ,persongroupteam.resppartyseq as resppartyseq ,persongroupteam.usefororg as usefororg , persongroupteam.useforsite as useforsite ,persongroupteam.groupdefault as groupdefault ,persongroupteam.orgdefault as orgdefault , persongroupteam.sitedefault as sitedefault ,persongroupteam.persongroupteamid as persongroupteamid ,persongroupteam.persongroup as persongroup , persongroupteam.rowstamp as rowstamp1 from persongroupteam RIGHT OUTER JOIN person on person.personid =persongroupteam.respparty

 

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.

[{"Business Unit":{"code":"BU005","label":"IoT"}, "Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11133259