Creating a View Using an ID

Using a single query, you can create a database view using the ID of an object

You can create a database view from any object if you know its ID. Depending on the object type, you will use a different procedure name.
  • To create a view from a form using its ID, use PS_ADD_FORM_ID_RV.
  • To create a view from a map using its ID, use PS_ADD_MAP_ID_RV.
  • To create a view from a scorecard using its ID, use PS_ADD_SCORECARD_ID_RV.
  • To create a view from a tab using its ID, use PS_ADD_FORM_TAB_ID_RV.
You must know the ID of the object from which you want to create the database view. To find the object ID, type SELECT * FROM PS_SCORECARD_PROP, then find the ID for the object in the resulting list.
  1. In Query Analyzer, type the following command:
    PS_ADD_<ObjectType_ID>_RV '<ObjectID>', '<ViewName>', '<ViewDescription>'
    Where:
    • '<ObjectId>' is the ID of the form, map, scorecard, or tab.
    • '<ViewName>' is the database view name.
    • '<ViewDescription>' is the description. You can use null if you do not want to provide a description for the view.
  2. Click Run.