[[[iviewui | Up To Index ]]] ====== iView Virtual Folders ====== ===== OverView ===== iView archives are single level storage. All documents are stored in the same location on the System i (which is a subdirectory of /iview, the subdirectory name being the archive name). The regular search method therefore simply looks through this storage to display a list of documents matching search criteria. Virtual Folders is a way of creating the illusion of structure in the archive. The administrator creates subdirectories of the main archive directory, and then specifies logical rules that, to the end user, appear to route documents into the subdirectories. The rules and thus the apparent routing operate on the archive index values, i.e. on the document contents. The documents themselves are never moved about. Virtual Folders is implemented by creating SQL statements from the administrator specified rules. The SQL statements are generated at the time of user access, so the administrator may change the rules at any time to change the apparent structure of the archive. The user need not even log out, although refreshing the browser page would be a good idea. The rules can also be used to limit visibility of documents. Thus a user can be limited to viewing only a subset of the total archive contents as may be appropriate. ===== Specifying the Administrator ===== iView Virtual Folders requires an administrator. To specify, from menu IVIEWADM, select the option: **Change iView Web Administrator**
                          Change Data Area (CHGDTAARA)                          
                                                                                
 Type choices, press Enter.                                                     
                                                                                
 Data area specification:                                                       
   Data area  . . . . . . . . . . > DSIVWADMIN    Name, *LDA, *GDA, *PDA        
     Library  . . . . . . . . . . >   IVIEW       Name, *LIBL, *CURLIB          
   Substring specifications:                                                    
   Substring starting position  . > *ALL          1-2000, *ALL                  
   Substring length . . . . . . .                 1-2000                        
 New value  . . . . . . . . . . . > QSECOFR                                     
                                                                                
* You may specify any user profile on the i5 as the iView Administrator. * No special system authority is required to be the admin. * The administrator itself is unable to use Virtual Folders; it can only configure it. Press specifying a valid user profile as administrator. ===== Enabling User Profiles =====
User ID. . . . . . . .: DYOKANA      F4=List                   
IP. . . . . . . . . . : 192.168.0.205                          
Last Hit. . . . . . . : 2007-07-09-09.50.26.102000             
                                  Usage       Folder           
              Archive     Access  *BOTH       Display          
              Application *YES/  *VFOLDER     *FOLDER          
              F4=List      *NO   *SEARCH      *FILTER          
              IVWINVOICE   *YES  *BOTH       *FOLDER           
              JOBLOG       *YES  *BOTH       *FOLDER           
                                                               
Next, from IVIEWADM menu option #6, **Work with iView User Authority**, make certain that all necessary users have either ***VFOLDER** or ***BOTH** specified as the **usage** access to the relevant iView archive applications. iView will not permit access to Virtual Folders unless the user has been granted access. ===== Creating the Virtual Folders ===== Log into iView as the Virtual Folders administrator specified above. {{pub:iview:vfleftpane.png | Virtual Folders Left Pane}} {{ pub:iview:vfrightpane.png| Virtual Folders Right Pane}} Click on the link to the Virtual Folders. The resulting page displays on the left the archive applications, which are subdirectories of /iview. Subdirectories you create within the archive applications are shown in the expandable list. When clicking on a directory in the left pane, the right pane displays all of the rules established for this directory as well as those for the directories above it. You create and delete virtual folders (subdirectories of the archive application) in the left pane by using the 'Add' and 'Delete' buttons. Remember to refresh the pane after doing so to see the resulting deletion or addition. To refresh the pane, right click on the pane and select 'Refresh'. ===== Creating Virtual Folder Rules ===== The following rule parameter fields are shown in the right pane: * **User**: You can specify that the rule applies to *ALL users or just to one. The one user is selected from the drop down list from among all users granted access to the particular archive application using the [[iviewarchiveapp#application_access | greenscreen security option]] discussed above. * **Field**: Select from the drop down list from among all of the defined archive indices. The indices are defined in application setup, [[iviewarchiveapp#application_setup | menu IVIEW option 1]]. * **Test**: Select the test to use. LIKE means substring or 'string contains'. You may use the asterisk as a wildcard. * **Value**: The value to test against the selected archive index. When specifying this value do not use single or double quotes, question marks, slashes (/ or \), or any other character that might confuse a browser. When using the LIKE test, use asterisk * to signify any number of characters or no characters (the wildcard). Thus, the test INDEX01 LIKE *inFORM* means to look in field INDEX01 to see if the word “inFORM” is contained anywhere within it, including at the very beginning or end. Note: The values field is case sensitive. When the rules have been specified, an end user may log into Virtual Folders and will see the resulting document routing. Note that because these rules are translated into SQL, and because there is a system limit on the length of a SQL statement (32,000 characters at this writing), **there is a limit to the number of directories** that can be used in Virtual Folders. This limit, unfortunately, is not static but is dependent on the length of the generated SQL statements. As a general rule consider limiting both the number of total directories in the archive and the complexity of the routing statements. It is always possible if necessary to put documents into a completely different archive. ===== Specific Example ===== **Example Objective**: limit user to viewing just his invoices, organized by month. **Index Setup**: In the [[iviewarchiveapp#application_setup | greenscreen archive setup]], specify INDEX01 as the customer number, and INDEX02 as the month numeric date. (Data format is character, though. Character is almost always easier to work with.) One could also specify the year numeric date but that is not discussed in this example. **Virtual Folder Setup**: Logged in as the web administrator, in the Virtual Folders setup use the Add button to add directories for all the months in the year, i.e. Jan, Feb, etc. Create these as subdirectories of the archive application. {{pub:iview:vfuserrule.png | Setup The Top Level User Rule }} **Parent Directory Rules Setup**: Click on the archive directory on the left, not one of the subdirectories. In the right panel, select the user as the user in question, specify the field as INDEX01 (customer number), specify the test as =, and then type the user's customer number in the Value field. If this rule is specified in the parent directory the rule will fall through to all the subdirectories and the user will be limited to just invoices with customer number = 100 throughout the archive. {{pub:iview:vfmonthrule.png | Setup the Month Directory Rule }} **Subdirectory Rules Setup**: Next, in the left pane click on each of the month subdirectories in turn. For each directory, in the right pane specify the routing test for that month. Example, in the subdirectory Jan specify the test as User = *ALL, field = INDEX02 (month), test is =, and value the numeric value of the month January, 01. **Result**: When the user logs in, everywhere in the archive the user looks only invoices with the user's customer number will appear in the right pane and be accessible to the user. Each invoice will appear in the directory corresponding to its month. **Note**: Limiting the user to specific documents can not be done in the regular search view. To truly limit the user's access to documents within an archive one must restrict their view on the archive to just *VFOLDER. ---- [[[iviewui | Up To Index ]]]