Version Notice: This article covers features in our r9/IS Pro platform. If you're looking for information on this topic related to r8, see Manage libraries.
Libraries are collections of code resources which are referenced from a survey's source code. Each library is a system resource. Any modifications to a library will affect all surveys utilizing it once the survey is re-compiled.
This page offers insights into viewing, editing, uploading, and managing library files directly. Creating and using libraries is a straightforward process that greatly increases productivity and promotes standardization of code. For guidance on implementing libraries within a survey, please see Using libraries in your survey.
Accessing libraries
To access system libraries, expand the Resources button group in the system navigation menu, and select the Libraries button.
Caution! Editing or deleting libraries should be approached with care, as any modifications will impact all surveys referencing that library. Carefully consider the implications of library changes before proceeding. Note that certain libraries are only editable by specific system users.
Overview
The Libraries applet defaults to the browse view. There is an action toolbar across the top of the table. Here you can create a new library with the Create New button or perform various actions on an existing library.
Tip! Survey Creators and higher roles can view libraries, while only Superusers and System Administrators can edit and create a new library. If action items are greyed out, you do not have permission to perform them.
The table displays all of the libraries presently loaded into the system. In addition to the Library ID, this view also displays the library Description as well as the Primary Version, which is the most recent version of that particular library. Versions may increment either when a Survey Programmer (SP) updates the library, or when the server itself is updated. The final column on the right has action buttons for editing, viewing, downloading, and deleting. The columns in the table can be sorted by clicking any one of these headings.
Library actions
To take any action, you should first select a library in the table. Then, click on the actions menu (three dots) in the top-right corner. The following actions are available in the main toolbar:
Action | Description |
View |
Displays the latest version of the library's code. |
Edit | Allows you to edit the code. |
History |
Displays the version history for the code. If one version is selected you can view the code; if two versions are selected, a version comparison is possible. |
Upload Changes | Allows you to upload changes to the code. |
Download | Downloads the library's contents to a .txt file. |
Delete | Deletes the library. |
Within each library's row, there are buttons and an action menu available with the same six options found in the main toolbar. The edit and view actions have their respective icons (a pencil and an eye), and the action menu expands to display the remaining items. If any menu items are greyed out, it indicates you do not have permission to perform those actions.
Tip! If you double-click on a library, it will open to the View screen. From here, you can find the same actions described above across the toolbar. Again, the actions available to you will depend on your system permissions.
Viewing libraries
To view a library, first select the library row in the table. Then, you can select View in the action menu in the toolbar, or click the eye icon next to it in the table. You can also double-click the table row itself. This launches a non-editable version of the contents of the library. From here, you can view the code and access menu items to take other actions. Click View Libraries to return to the browse view.
Editing libraries
To edit a library, first select the library row in the table. Then, you can select Edit in the action menu in the toolbar, or click the pencil icon next to it in the table. You can also double-click the table row itself to view it, and click Edit in the top-right. In this mode, the contents of the library are now editable by certain survey roles.
After editing a library, click the Review Changes button to proceed, or press Cancel to return to the last saved version.
The differences between the current and new versions will be compared in the Original Source and Revised Source columns. Line changes are highlighted yellow, with added text in green and removed text in red. To accept the changes, click Save Changes. To return to the editing screen, click Back.
Note: Editing and saving a library will not automatically affect any surveys that reference the library. Any survey that references the library would need to be re-saved and re-published in order to pull in the changes that were made to the library.
Reviewing library history
Library history works in the same way as survey version management is handled in the Versions Manager applet. To view a library's history, first select the library row in the table. Then, you can select History in the action menu in the toolbar or in the action menu (three dots) next to it in the table. You can also double-click the table row itself to view it, and click History in the top-left. The version history will be displayed in a table format. Select any single version to view it or download it to a .txt file.
You can also compare changes between versions. You can manually select any two versions, or you can click the square in the left-most column's header to choose the two most recent versions automatically. Once two versions are selected, the Compare button in the top-right becomes active. Click it to view the differences.
Uploading revised library code
Upload Changes is another way to edit a library, but instead of editing the contents in an editor window, you can upload a file to overwrite the existing version.
To upload changes to a library, first select the library row in the table. Then, you can select Upload Changes in the action menu in the toolbar, in the action menu next to it in the table, or in the action menu from the View screen.
Click Select a file. Once the appropriate file is selected, press Review Changes button to upload the file.
The differences between the current and new versions will be compared in the Original Source and Revised Source columns. Line changes are highlighted yellow, with added text in green and removed text in red. To accept the changes, click Save Changes. To return to the editing screen, click Back.
Similar to the Edit feature, editing and saving a library will not automatically affect any surveys that reference the library. Any survey that references the library would need to be re-saved and re-published in order to pull in the changes that were made to the library.
Downloading library code
To download a library, first select the library row in the table. Then, you can select Download in the action menu in the toolbar or in the action menu next to it in the table. You can also double-click the table row itself to view it, and click Download in the top-left. The library code will be downloaded as a .txt file
Deleting libraries
To delete a library, first select the library row in the table. Then, you can select Delete in the action menu in the toolbar, in the action menu next to it in the table, or in the action menu from the View screen. Once clicked, a confirmation message will appear. Clicking Yes will delete the library, and clicking No will close the dialog box.
Creating new libraries
To create a new library, click the New button from the main toolbar. Like creating a new survey, first the library ID and a description are specified. Then, users can elect to create the library content via File upload or Cut and paste.
The File upload option follows the same process as uploading a file for editing.
The Cut and paste option is very similar to the manual editing process.
Once the content is ready, click Next. After creating the library, it will be ready to be referenced by surveys. Click View Libraries to return to the browse view.
Comments
0 comments
Please sign in to leave a comment.