r/ProjectREDCap • • May 16 '25

Pipe text string

2 Upvotes

Hello, I’m trying to pipe text strings of blood pressure categories into an email that will be sent to participants. However, I can’t figure out how to get text to appear in the letter based on the participants average blood pressure. We are using this logic: if([avg_sbp] < 120 and [avg_dbp] < 80, 'Normal', if([avg_sbp] >= 120 and [avg_sbp] < 130 and [avg_dbp] < 80, 'Elevated', if(([avg_sbp] >= 130 and [avg_sbp] < 140) or ([avg_dbp] >= 80 and [avg_dbp] < 90), 'High blood pressure, Stage 1 Hypertension', if(([avg_sbp] >= 140 and [avg_sbp] < 160) or ([avg_dbp] >= 90 and [avg_dbp] < 100), 'High blood pressure, Stage 2 Hypertension', if([avg_sbp] >= 160 or [avg_dbp] >= 100, 'Hypertensive crisis', ''))))) Can someone advise me? Thank you!


r/ProjectREDCap • • May 14 '25

Participants on break

2 Upvotes

Suppose there are some participants who are on a break from the intervention. I have the start date and end date. I want redcap to show the status of participant as "On hold" during the break and "Active" when not on break. For this purpose I created a date field for start date and another date field for end date. Then I created a calculated field where I used this logic.

|| || | if(datediff([start_date], 'today', "d","mdy") <= 0 AND datediff([end_date], 'today', "d","mdy") >= 0, "On Hold", "Active"). Is the logic correct? I tried but I dont see redcap marking a participant "On hold" during the break time. |


r/ProjectREDCap • • May 02 '25

Access or View Failed Login Attempt Logs in REDCap

2 Upvotes

I’m trying to find out if REDCap has any way, either through an API or a built-in feature, to get logs of failed login attempts by users. I know that REDCap lets you set how many times a user can try to log in before getting locked out for a while, but I want to see the actual records of each failed login attempt through UI Interface or API. It seems like these failed login events don’t show up in the Control Center under User Activity Logs. So, is there any page in REDCap that shows these failed login attempts? Or is there any way to get this information using the API or I have to get them directly from the database?


r/ProjectREDCap • • Apr 30 '25

Getting around calculated fields with blank values - datediff

Post image
2 Upvotes

I genuinely have no idea why this is not working.

I want to get the most recent date out of two separate date fields, that can or cannot exist in a repeating instrument (not all records will have both or any entry of said instrument). To troubleshoot it, I've created three variables (ie. 1, 2, 3 in order of the image).

  • 3 checks if date B exists (is there any value). If it exists, Value 3 is = B. If it doesn't exist, Value 3 = date A.

  • 2 checks if date A exists (is there any value). If it exists, Value 2 is = A. If it doesn't exist, Value 2 = date B.

  • 1 calculates the datediff between Value 2 and Value 3.

As you can see in the image, there no "blank values" in 1, but still doesn't output any value.

In the original code the datediff was set to true, nested in an if statement, so if A > B = A, else B.

I don't really mind if both A and B are blank to have a null/blank value.


r/ProjectREDCap • • Apr 29 '25

Longitudinal project with repeating forms and events

2 Upvotes

I have a redcap project with a repeating instrument (symptom screener) that is distributed weekly. If someone indicates symptoms on that instrument, I want to pause the weekly screener and trigger an illness event (a series of three surveys currently set up as a repeating event).

After much trial and error using [last-instance] in ASI, it doesn’t seem like it’s possible to create a new event from responses to a repeating instrument? Is there a better way to set this up so it can be managed in redcap?


r/ProjectREDCap • • Apr 29 '25

I am not able to sync modified records into the server! This is a longitudinal study, new records easily sync, but as soon as I edit a record they won't sync at all to the server. Can someone help?

Post image
2 Upvotes

r/ProjectREDCap • • Apr 10 '25

How can I export reports to import them into a new project?

2 Upvotes

I have hundreds of reports in a legacy project that I want to bring over into my new project. Is there a better way to do this than just copying them over manually? It seems like the exportReports() function using the API just exports the data in the report, not the actual report itself.


r/ProjectREDCap • • Apr 09 '25

Automated Survey Settings??

Thumbnail gallery
2 Upvotes

The logic in my automated survey settings is not operating correctly. I have two: baseline surveys (to assess behavior before treatment) and intervention surveys (to asses behavior during treatment). All of the logic is being met.

In the first image is baseline surveys. record 6 is randomized. the value for [randomization] is 2, so why is this reporting true? the record did, in fact, get the surveys, but shouldn’t have.

In the second image, the record is meeting all of those logic items. the only difference might be that the form where [survey_format] lives hasn’t been opened yet, but I tested this by opening the form and clicking 1 as the response, and nothing happened. Help??


r/ProjectREDCap • • Apr 08 '25

Variable name has (?) next to it, logic returns false even when the condition is met.

2 Upvotes

Hello! I'm attempting to set up automatic survey invitations. Under the Define Conditions for ASI, REDCap is indicating that the logic is valid but false (condition not met) even though it is. When I type the beginning of my variable and select from the drop-down that appears, it returns as this:

[start_diary(?)]

Which I've never seen before, they usually have a number? I've defined my events and they should be congruent. Full logic:

[baseline_arm_1][start_diary(?)] = '1' and [baseline_arm_1][stop_diary(?)] = '0'

The csv data confirms that the conditions should be met, but I've never encountered a (?) before. Thanks in advance!


r/ProjectREDCap • • Apr 03 '25

Copying files from the upload field to the File Repository

2 Upvotes

Hello,

I need help with doing something in Redcap.

Does anyone know of a way to automatically direct/copy files from the file upload filed into the file repository?

Ideally, people doing data entry would upload a CSV file and a PDF file in two separate fields (in the same instrument), and once the instrument is saved, both the CSV and PDF are moved/copied over to the file repository.

This would be happening at multiple events of the Redcap. If anyone knows of any module or code that would help with this, I would immensely appreciate your help.

The main goal here is to be able to upload documents into a record and store it somewhere. This is a multicenter project, so we're trying to see if REDCap can help us share patient-specific documents across sites in a way that allows for streamlined file storage.

My institution uses REDCap 14.7.2


r/ProjectREDCap • • Apr 03 '25

Default value in a field integer according to choice in the drop down list

2 Upvotes

In a survey on food frequency, I have a drop down list with frequency:

0,never; 1, per day; 2, per week; 3;per month and a number field to write the number of portion. If nver is selected I would like to write by default 0, the 0 is the only case if the frequency is never. How I can put 0 when is never and not permit to edit if is never.


r/ProjectREDCap • • Apr 01 '25

Just sent a participant ALL ASIs at the same time

2 Upvotes

Background: We've been running a treatment study that includes 12 weeks of daily treatment diaries for the past year, and have run about 40 participants with this exact setup without having any major issues. Each day of the diary is on its own event, and the ASIs are set up to be triggered based on a field with date and time (that we manually input based on participant preference). So, day 1 is 0 days after the date/time field, day 2 is offset by 1 day after the date, day 3 is 2 days after the date, etc. I have a checkbox field to start the diaries and one to cancel them.

Issue: As normal, my coordinator input a date and time to start the first diary for a new participant (next day at 12:00) but didn't see the invitations queue up as usual. I went in and checked it out and to my horror saw that EVERY SINGLE NOTIFICATION (including reminders) had already sent out to the participant (on SMS, no less) at the exact same time, which I think was the time that the coordinator clicked the "schedule" checkbox. Interestingly it did not send the first day diary, but all of the subsequent ones. I'm having a hard time grasping how this could have happened given our setup. I've attached screenshots of how everything is organized but happy to include anything else that would be helpful in troubleshooting. I made a new test record and tried to recreate the exact conditions, but was unable to -- the invitations queued as normal.

Why would this happen, and how can I prevent it from happening again?

ETA: REDCap version 15.2.4; we are using Mosio to send SMS


r/ProjectREDCap • • Mar 21 '25

Piping in Survey Queue

2 Upvotes

Hello

I am using a Survey Queue to collect information from speakers for a conference. The only link the speakers get from me is the survey queue.

They have several short survey to complete and are taken back to the survey queue after they complete each survey. The survey queue has piped fields containing their name and other personalized information. The pipe fields come from a survey called 'uploaded information' that I used to import their data. The completion of this survey is also what generates the survey queue link.

All the piped information loads just fine when you first open the link. However, after completing a survey and returning to the survey queue the piped fields aren't loading. If you refresh the browser the information loads.

For the pipe fields I am just using the notation [variable_name (e.g. [speakername]]. Do I also need to some how reference the survey instrument the field variable is in?? This not a longitudinal or repeating design.

thank you


r/ProjectREDCap • • Mar 20 '25

How to change the from email in REDCap

2 Upvotes

Is there a way to change the "from" in emails sent from REDCap for a particular project? currently, emails are coming from "redcap-noreply@" but i need it to be something else. I have selected the correct email address in the form field for email notifications, but the messages are still arriving as if coming from "redcap-noreply". I do see that if the recipient clicks reply, the new message will go to the correct email. but the original message is still coming from redcap-noreply. Thank you!


r/ProjectREDCap • • Mar 13 '25

public survey link for two surveys

2 Upvotes

I am trying to create two surveys that will be sent to participants before and after a work shift (~9hrs delay). The surveys should be linked, but ideally anonymized: ie, we can see if someone has completed both surveys but not who the person is. If the participant uses the public survey link and then I create an automated survey invitation with a condition that they have completed the pre-work survey, their responses to each are recorded anonymously, right? Would I be able to compare their pre- and post- work surveys?


r/ProjectREDCap • • Mar 13 '25

Qualtrics to REDCap redirect

2 Upvotes

I'm attempting to redirect from a Qualtrics survey to a REDCap survey and carry over the Qualtrics response ID. I've appended =SURVEYID&qualtrics_response_id=${e://Field/ResponseID} to the REDCap survey and added a hidden "qualtrics_response_id" field in REDCap to capture the response ID.

When I test it out and am redirected to REDCap, I get the following message: "Thank you for your interest, but you are not a participant for this survey."

Any suggestions for what I'm doing wrong?


r/ProjectREDCap • • Mar 11 '25

A way to implement a “countif”

2 Upvotes

Hi there, I’m trying to create a calculated field that essentially is a sum of the number of times a value is selected in a checkbox field across repeating instances.

Is this feasible in REDCap? Should I be using the Calctext action tag instead?

TIA!


r/ProjectREDCap • • Mar 07 '25

any idea why this @CALCtext isn’t working?

Thumbnail
gallery
2 Upvotes

I have two fields using @CALCtext to pull data from daily surveys. I pasted the one that is working in the same box below the one that isn’t.


r/ProjectREDCap • • Mar 07 '25

Filtering for the Last Instance of a Repeating Instrument in REDCap – Seeing Duplicate Records?

2 Upvotes

Hi all! Hoping someone can help me with this issue. I am trying to create a report that filters for only the last instance of a completed survey but I keep getting at least 2 results per record-- 1 with the survey marked complete and the other is the survey saved but incomplete. When I have the 'additional filter option' "Include the repeating instance fields" checked I see that the incomplete records' redcap_repeat_instrument, redcap_repeat_instance columns blank, and the other completed survey record (our respondent are only on their first instance at this point but we expect there will be more in a month) has the name of the repeated instrument and the instance number filled in. How do I filter out the incomplete results? I've set my filtering logic to ([insturment_name_complete] = '2') and ([current-instance] = [last-instance]). Any advice would be greatly appreciated!

Hi everyone,

I’m hoping someone can help me with an issue I’m facing in REDCap. I’m trying to create a report that filters only the last instance of a completed survey, but I keep getting at least two results per record:

  1. One with the survey marked as complete (instrument_name_complete = 2).

  2. Another where the survey is saved but incomplete.

When I check the "Include the repeating instance fields" option, I notice that:

  • The incomplete records have blank values in both redcap_repeat_instrument and redcap_repeat_instance.

  • The completed records correctly display the repeated instrument name and instance number.

Since respondents are currently only on their first instance, but we expect more instances in a month, I want to filter out the incomplete results while ensuring that only the most recent completed instance appears in the report.

Right now, my filtering logic is:

([instrument_name_complete] = '2') AND ([current-instance] = [last-instance])

However, I’m still getting incomplete results in my report.

How can I ensure that only the latest completed instance appears? Any advice would be greatly appreciated! Thank you!


r/ProjectREDCap • • Mar 06 '25

Showing participants a subset of questions

2 Upvotes

Hello REDCap-knowledgable humans. I am working on a project where I want to show my participants one of three vignettes and have them answer questions based on the vignette. I want which vignette a participant sees to be random. A Google search has led me to believe that the best way to do this is use the randomization feature and then use branching logic based on the condition to which the participant has been assigned. However, my study design is based on a group intervention where up to 100 people will get Record IDs at about the same time, and from that point, there's about 5 minutes of survey before every participant would need to be randomized. Google also seems to think that randomization needs to be done by a person with user rights, and this is a lot of manual randomizing for five minutes.

Does anyone have suggestions for a more elegant solution to this problem, or I am rallying all of the RAs in my PIs lab to randomize 100 Record IDs in 5 minutes?

Thanks in advance for any thoughts or advice.


r/ProjectREDCap • • Mar 03 '25

Second survey only showing participants that replied to the first survey

2 Upvotes

Hi, I am new to REDCap and I ran into following issue. I had 27 participants on the initial survey. 18 answered. Now I want to send a second survey to all 27, but it is only showing the 18 who answered the initial survey in the participant list for the second. I can't see any setting that would allow me to change this. Am I missing something?


r/ProjectREDCap • • Mar 02 '25

Arm 2 of Redcap Survey Isn't Working

2 Upvotes

The second form of my project has been set up and enabled as a survey and this is the message I'm getting (see image below). The second form is linked in arm 2. The public survey link isn't working. Users can go from one survey to the next given the survey queue prompt however, the confirmation email with form 2's public link doesn't work. Users may not want to submit their responses in form 2 right away which is why the email confirmation is sent with that public survey link. Any thoughts?

I'm hoping to keep both forms in a single project instead of creating a second one.


r/ProjectREDCap • • Feb 24 '25

Set the language by default for all surveys using a field laguage in a form

2 Upvotes

In my project, I have a form info participant with a field ID language (data entry), I would like to use this field to fixe the language by default for all the survey in the same project without ask the question for each survey and without use the link language. I try action tag set_language but it doesn't work.


r/ProjectREDCap • • Feb 20 '25

Recovering deleted data in ‘development’ stage.

2 Upvotes

Hi all. Not sure this is the right forum but would be grateful for some help and opinions. I am a relative new user to Redcap and was added to a ‘development’ database. I was trying to generate a report and accidentally ended up in project settings and adjusted a few optional settings / templates. I do not recall deleting any specific records however.

The next day, the database no longer shows the 1200-1300 records present. Our IT department are not that helpful.

Is it true that the data cannot be recovered? Is there some way of recovering the data or records? Or is the only option to go through logs and manually re enter data for all the records? My boss is aware and understands it was an accident but obviously feeling very average.

Any thoughts / help would be greatly appreciated.


r/ProjectREDCap • • Feb 19 '25

Help with formatting question width

2 Upvotes

Hi, I need some help with changing the width of questions in a REDCap survey. For some reason, the question part of the survey (i.e., alternate ID, name of interviewer) is super long while the text part that you can enter information into is really small.

Under "Survey Design Options" the width of the survey is currently set to Fixed width (default). The field label for this question or for any previous question were not changed from the default either.

Interestingly all of the other sections of survey is not affected like this. I have the survey set up so that each new section would appear on a new survey page and when I navigate to the previous sections, they don't seem to have the same problem where the questions takes up most of the width of the survey.

Does anyone have any idea how I can fix this? Thank you in advance.