Using Business Views to Limit Master File Fields
by Maria Volant
At some point you may have a Master File that you want to give your users, but you would like to limit the fields available in the Master File, organize fields in a different way or even have more meaningful names.
In release 7.6 we implemented a new feature called Business Views that allows you to do just that. Creating a Business View of an existing Master File allows you to select a subset of fields from the original Master File, hence limiting the fields you want to make available to other users. You can create folders with meaningful names and group fields into these folders to better organize the fields. The fields in a folder may come from different segments in the original Master File and you can further customize field names (mixed case is allowed), titles and descriptions for each Business View.
If the original Master File for which you create a Business View contains filters, DEFINE and COMPUTE fields, these may also be included in the desired folder(s) in the Business View, so that they can be available when creating reports using the Business View Master File. When creating a Business View, a default name is automatically generated for it, but you can use the File, Save As option from the toolbar to save it with a name of your preference. The default name generated is of the form MasterFileName_bvnn, where

Screen 1
MasterFileName is the name of the original Master File used to create the Business View.
bv is the indication that it is a Business View Master File.
nn is an incremental number indicating how many Business View Master Files have been created under a particular application.
By default the Business View Master File will be stored in the application folder under which it has been created. However, you can save the Business View to an application different from the original Master File.
- When reporting against a Business View Master File, the underlying Master File must reside in the application path. The SET command SET FOCTRANSFORM = ON is required in order to execute a request that was created using a Business View. This SET command can be issued inside the procedure itself, in the user profile or in the global server profile. Because this set command cannot be issued through the thin client tools, such as Power Painter, Advanced Graph Assistant, it is recommended to issue the command in the user or server profile.
Creating a Business View with Developer Studio Synonym Editor
You may create a Business View for an existing Master File by clicking on the Create Business View… icon in the Synonym Editor toolbar. The following steps show how to access the Synonym Editor from Developer Studio to create a Business View for the ggsales Master File.
- In Developer Studio navigate to the ggsales Master File and double click on it (Screen 1). The Synonym Editor opens to the Tree View tab.
- Click on the Create Business View… icon. The Business View tool opens to the Business View Tree tab with a default folder under which you would group the fields for the Business View.
- Right-click on FOLDER1, select Rename, type ROOTFOLDER, and click the Enter key.
- Right-click on ROOTFOLDER and select New Folder.
- Repeat step 4 until you have created three new folders under ROOTFOLDER.
- Rename each folder from top to bottom as follows: LOCATION, PRODUCT, and SALES.
- In the Synonym Referenced by the View window highlight the fields REGION, ST, and CITY, then drag and drop them into the LOCATION folder
- Highlight the fields CATEGORY, PCD, and PRODUCT, then drag and drop them into the PRODUCT folder.
- Highlight the fields UNITS, DOLLARS, BUDUNITS, and BUDDOLLARS, then drag and drop them into the SALES folder.
- Rename all the fields as follows: To rename a field, right-click on the field, select Rename, enter the desired name, then press the Enter key:
REGION to Region
ST to State
CITY to City
CATEGORY to Category
PCD to Product ID
PRODUCT to Product
UNITS to Units
DOLLARS to Dollars
BUDUNITS to Budget Units
BUDDOLLARS to Budget Dollars
- Select File, Save As from the Developer Studio tool bar and save the Business View Master File as ggsales_bv. At this point, the Business View should look like what you see on Screen 2.
- Select File, Close twice from the Developer Studio toolbar to close the Business View tool followed by the Synonym Editor tool

Screen 2

If you right click on ggsales_bv, and select Edit in Text Editor, you will notice that although a Business View Master File is stored as if it were a real Master File, it contains no SUFFIX attribute. Instead, the Business View contains a VIEW_OF attribute which identifies the Master File as a Business View. The value of the VIEW_OF attribute in the Business View identifies the underlying Master File, as shown here:
FILENAME=GGSALES_BV, VIEW_OF=ggsales, $
SEGMENT=ROOTFOLDER, $
SEGMENT=LOCATION, PARENT=ROOTFOLDER, $
FIELDNAME=Region, ALIAS=REGION, $
FIELDNAME=State, ALIAS=ST, $
FIELDNAME=City, ALIAS=CITY, $
SEGMENT=PRODUCT, PARENT=ROOTFOLDER, $
FIELDNAME=Category, ALIAS=CATEGORY, $
FIELDNAME=Product ID, ALIAS=PCD, $
FIELDNAME=Product, ALIAS=PRODUCT, $
SEGMENT=SALES, PARENT=ROOTFOLDER, $
FIELDNAME=Units, ALIAS=UNITS, $
FIELDNAME=Dollars, ALIAS=DOLLARS, $
FIELDNAME=Budget Units, ALIAS=BUDUNITS, $
FIELDNAME=Budget Dollars, ALIAS=BUDDOLLARS, $
To a business user, Business Views are listed as if they are real Master Files. If you open Report Painter with the ggsales_bv Master File, you will notice that only the fields from the Business View are displayed in the Field Tree (Screen 3).
When using a reporting tool to create a request using a Business View Master File, only the fields from the Business View are displayed in the tool Field List. The Field formats, titles and descriptions are retrieved from the original Master File, unless they are customized in the Business View. For more details on Business Views, see Creating Business Views in the WebFOCUS Developer Studio Online Documentation.

