# Data Viewer {#data-viewer}



## Page Overview {#page-overview}



### What the page is for {#what-the-page-is-for}
The Data Viewer is your central hub for working with survey responses. From here you can view response data, analyze results, export in multiple formats, manage attachments, and build custom dashboards.


### When a user would use it {#when-a-user-would-use-it}
- When you want to view and browse survey responses
- When you need to analyze survey results
- When you want to export data for external analysis
- When you need to manage response attachments
- When you want to build custom analytics dashboards
- When you need to approve or reject responses
- When you want to edit or delete responses


## How to Access This Page {#how-to-access-this-page}



### Navigation path from the main app {#navigation-path-from-the-main-app}
1. Log in to the application
2. From the main dashboard, use the sidebar navigation to click on "Data"
3. Or, from a survey's page, click "View Data" in the actions menu
4. Or, directly navigate to `/data` in your browser


### Permissions or prerequisites {#permissions-or-prerequisites}
- You must be logged in to access this page
- You need appropriate permissions to view, edit, or delete responses
- Some actions (like approving responses) require specific permissions


## Page Layout {#page-layout}



### Header / title {#header--title}
- **Title**: "Data Viewer"
- **Subtitle**: "View, analyze, and export survey responses"


### Survey selector {#survey-selector}
- A dropdown menu to select which survey's data you want to view
- Includes a search bar to find surveys quickly
- Refresh button next to the selector


### Action buttons {#action-buttons}
- **Bulk Import**: Import responses in bulk
- **Export Data**: Open the export dialog


### Main tabs {#main-tabs}
Five tabs to switch between different views:
1. **Data Table**: Browse and manage individual responses
2. **Analytics**: View charts and summary statistics
3. **Attachments**: Manage media files from responses
4. **Export**: Quick export options
5. **Dashboard**: Build custom dashboards


## Data Table Tab {#data-table-tab}



### Search bar {#search-bar}
- Search responses by respondent name, RID, UID, or response ID


### Bulk action toolbar {#bulk-action-toolbar}
- Appears when you select multiple responses
- Provides bulk operations


### Response table {#response-table}
Columns (left to right):
1. **Checkbox**: Select responses for bulk actions
2. **RID**: Response Identifier
3. **UID**: Unique Identifier
4. **Respondent**: Name of the respondent
5. **Status**: Badge showing response status (Started, In Progress, Completed, Submitted, Invalid, Pending Approval, Approved, Rejected)
6. **Progress**: Progress bar showing completion percentage
7. **Answers**: Number of completed answers / total answers
8. **Submitted**: How long ago the response was submitted
9. **Valid**: Badge showing if response is valid
10. **Actions**: Menu with available actions


### Action menu (per response) {#action-menu-per-response}
Clicking on the three-dot icon (⋮) next to a response opens a menu with:
- **View Details**: Opens response detail dialog
- **Edit**: Edits the response (only for submitted/completed)
- **Submit for Approval**: Sends for approval (only for submitted/rejected)
- **Approve**: Approves the response (only for pending approval)
- **Reject**: Rejects the response (only for pending approval)
- **Delete**: Deletes the response (not available for pending approval)


## Analytics Tab {#analytics-tab}
Shows charts and summary statistics for the survey responses.


## Attachments Tab {#attachments-tab}
Manages all media files (images, videos, audio, documents) from survey responses.


## Export Tab {#export-tab}
Quick export options with cards for each format:
- **CSV Export**: Comma-separated values
- **Excel Export**: Microsoft Excel format
- **JSON Export**: Structured JSON data
- **Media Export**: Download all media files
- **STATA Export**: .dta format for Stata
- **SPSS Export**: .sav format for SPSS

Each card has an export button. Also includes:
- Information about what's included in exports
- Advanced Export Options button


## Dashboard Tab {#dashboard-tab}
Build custom dashboards with charts and visualizations.


## Step-by-Step Tasks {#step-by-step-tasks}



### Selecting a Survey {#selecting-a-survey}
1. Click the survey selector dropdown
2. (Optional) Type in the search bar to find a survey
3. Click on the survey you want to view
4. The data will load automatically


### Viewing Response Details {#viewing-response-details}
1. Find the response in the table
2. Click the three-dot menu icon (⋮)
3. Select "View Details"
4. A dialog will open showing full response information, including:
   - Response metadata
   - All answers
   - Edit history
   - Approval/rejection information


### Editing a Response {#editing-a-response}
1. Find a submitted or completed response
2. Click the three-dot menu icon (⋮)
3. Select "Edit"
4. Make changes in the edit dialog
5. Save your changes


### Submitting a Response for Approval {#submitting-a-response-for-approval}
1. Find a submitted or rejected response
2. Click the three-dot menu icon (⋮)
3. Select "Submit for Approval"
4. Confirm in the dialog


### Approving a Response {#approving-a-response}
1. Find a response pending approval
2. Click the three-dot menu icon (⋮)
3. Select "Approve"
4. (Optional) Add notes
5. Click "Approve Response"


### Rejecting a Response {#rejecting-a-response}
1. Find a response pending approval
2. Click the three-dot menu icon (⋮)
3. Select "Reject"
4. Enter a reason for rejection
5. Click "Reject Response"


### Deleting a Response {#deleting-a-response}
1. Find the response you want to delete
2. Make sure it's not pending approval
3. Click the three-dot menu icon (⋮)
4. Select "Delete"
5. Confirm the deletion


### Searching for Responses {#searching-for-responses}
1. Click in the search bar above the table
2. Type a respondent name, RID, UID, or response ID
3. The table will automatically filter to show only matching responses


### Exporting Data (Quick Export) {#exporting-data-quick-export}
1. Go to the Export tab
2. Click the export button for your desired format
3. Wait for the export to complete
4. The file will download automatically


### Exporting Data (Advanced) {#exporting-data-advanced}
1. Click the "Export Data" button at the top of the page
2. Or, in the Export tab, click "Advanced Export Options..."
3. Configure your export settings
4. Start the export


### Viewing Analytics {#viewing-analytics}
1. Click the "Analytics" tab
2. Browse the charts and statistics
3. Interact with visualizations as needed


### Managing Attachments {#managing-attachments}
1. Click the "Attachments" tab
2. Browse and manage media files from responses


### Building a Dashboard {#building-a-dashboard}
1. Click the "Dashboard" tab
2. Add and configure chart panels
3. Arrange and customize your dashboard


## Field & Button Reference {#field--button-reference}


| Field/Button | What it does | When to use it |
|--------------|--------------|----------------|
| Survey selector | Chooses which survey's data to view | When you want to switch between surveys |
| Refresh button | Reloads survey data | When data might have changed |
| Bulk Import | Imports responses in bulk | When you have responses to import from another source |
| Export Data | Opens export dialog | When you want to configure advanced export options |
| Data Table tab | Shows response list | When you want to browse individual responses |
| Analytics tab | Shows charts and stats | When you want to analyze results |
| Attachments tab | Manages media files | When you need to access response attachments |
| Export tab | Quick export options | When you want a simple export |
| Dashboard tab | Custom dashboards | When you want to build custom visualizations |
| View Details | Shows full response | When you need to see all response information |
| Edit | Modifies response | When you need to correct or update a response |
| Submit for Approval | Sends for review | When a response needs approval |
| Approve | Approves response | When a response is ready to be finalized |
| Reject | Rejects response | When a response needs changes |
| Delete | Removes response | When you no longer need a response |


## Tips & Notes {#tips--notes}


- **You can't delete pending approval**: Reject a response first before deleting it
- **Export includes important metadata**: All exports include RID, UID, timestamps, and validation status
- **Excel has extra features**: Excel exports include formatted headers and a summary sheet
- **Approval workflow ensures quality**: Use the approval process to maintain data quality
- **Check edit history**: The response detail view shows all edits made to a response
- **Media export organizes files**: Media export downloads files organized by response
