Toggle navigation
Home
▼ Details
Products and pricing
Chart gallery
User stories
Text analytics
CDC NAMCS Library
Blog
Tutorials
Contact
Sign in
Post Editor
← All help posts
View post
Save
This tutorial shows data processing code to remove data from a project on a per respondent level. The code to remove respondents can be added to static data processes or pre-cal since it is lightweight, and doesn't impact processing time when opening the project. ## Code First find a variable that can be used to identify respondents. Typically, there is a **respondentid** or **respid** column in the data. Edit the code below to reference the correct values (e.g. "101") and filter out the relevant respondents. The logic is straight forward.The "if" statement sets a condition to return false for respondents that you want to remove and return true for those you want to keep. This code can go into project pre-calculate or a data process. ``` rows = rows.filter(function(row) { if (row.respid == "101") return false // remove respondent with respid ="101" if (row.respid == "102") return false // remove respondent with respid ="102" if (row.status == "INCOMPLETE") return false // remove incomplete respondents return true // do not remove anyone else }) return rows; ``` <img src="/uploads/upload/image/5200/direct/1574709496440-responid%20remove.gif" style="width: 720px;" class="fr-fic fr-dib"> **Reminder**: For data processes, "Save" and "Run" the process after you are done editing the code view. To use the result of the process as the primary data for the project, you will need to set it as "Primary". *Data processes are specific to each project, and your code may not look identical to our example.*
Publishing
Date
Status
Published
Draft
Slug
edit
Content
Thumbnail
Categories
Manage
New to Protobi?
Charts
Making Changes
Intermediate topics for editors
Frequently Asked Questions
SERMO Topics
Tutorial Pages
Internal Docs
Data Processing
Videos
Obsolete
GSG Admin
SERMO Admin
GSG Topics
How to...
Basics for viewers
Basics for editors
For project admins
Advanced topics
Assessments
Articles (in-progress)
New and updated articles
Process data in Protobi
superseded
Text open-end questions
Troubleshooting
Tracking studies
Organizing the view
API References
Tools
AI Database
Checking AI...
Convert to MD
Danger zone
Delete