Libraries are code resources which are referenced from a survey source.
This page focuses on how to upload, edit, and otherwise manipulate the library files themselves. Creating and using libraries is a straightforward process that will both greatly increase productivity and promote standardization of code. For information relating to the mechanics of how to use them in a survey, please see Libraries.
Accessing libraries
To access Libraries, expand the Resources button group in the System Navigation Menu, and select the Libraries button.
This launches the Libraries applet, which will default to the Browse view. The Browse view 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 Libraries Browse grid can be sorted by any one of these headings.
Library actions
The following actions are available via the Browse Libraries header buttons or Actions menu. To use these actions, click on the library first, which will activate these buttons and menu options.
Viewing libraries
To view a library, double-click the library entry, or select the library entry in the Browse grid, then click the View button. This launches a non-editable version of the contents of the library.
Editing libraries
To edit a library, select the library entry in the browse view, then click the Edit button. The Edit feature works in an a similar fashion as the View feature, except that the contents of the library are now editable. Clicking the Reset button will revert the contents back to the original state when editing began. After editing a library, the changes must be saved by clicking the Next: Review Changes button.
The changes 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 colored green and removed text colored red. To accept the changes, click Commit Changes. The updated file will then be sent to the server and the contents will overwrite the current contents of the library.
Editing and saving a library will not automatically impact any surveys that reference the library. Any survey that references the library would need to be manually compiled once more in order to pull in the changes that were made to the library.
Uploading revised library code
Upload is another way to edit a library, but instead of editing the contents in an editor window, the user uploads a new version to overwrite the existing version. As with Edit, all surveys which reference the library must be refreshed for the changes to take effect.
To upload a revision to a library, select the library to update, then click Upload from the Actions menu. Once the appropriate file is selected, click the Next: Review Changes button to upload the file.
The changes between the current and new versions are compared in the Original Source and Uploaded Source columns. As with editing a library, the line changes are highlighted yellow, with added text colored green and removed text colored red. To accept the changes, click Commit Changes. The uploaded file will then be sent to the server and the contents will overwrite the current contents of the library. Make sure to compile/reparse any surveys using the library in order for them to apply the most recent version of the library.
Downloading library code
To download a library, click the Download button from the ribbon. This initiates a download within the web browser. The library code will be downloaded as a .txt file.
Deleting libraries
To delete a library, select the library in the Browse grid, and click the Delete button. Once clicked, a confirmation dialog will appear. Clicking Yes will delete the library, and clicking No will close the dialog box.
Editing or deleting libraries are not actions to be taken lightly. A changed library will also affect every survey referencing that the library. Be sure to carefully consider library changes before committing them.
Creating new libraries
To create a new library, click the New button from the Actions menu. Like adding a new survey, first the library ID and a description are specified. Then users can elect to create the library content via Cut and paste or File upload. After creating the library, it will be ready to be referenced by surveys.
Viewing library history
Library History works in the same way as survey version management is handled in the Versions Manager applet. Select the library from the grid, then click History in the Actions menu. The version history appears in a grid. Each prior version can be viewed, downloaded, or reverted to. Changes between versions can also be compared. See the Survey version management page for more information about how to use these features.
Library versions are associated with software versions now due to version partitioning. As such, it is possible to have some versions of a library associated with a particular software version but not other versions. In the above screenshot, library versions 422 through 756 are not listed as they are not associated with this software version.
Using libraries
See Libraries for more information on how to use libraries in your survey source code.
Comments
0 comments
Please sign in to leave a comment.