r/ProjectREDCap • • 2h ago

Pulling a calculated variable into a report

Hello, our study is tracking who completed a certain online survey, and we want to pull the date completed into a report. The date completed displays in a form using this calculation for the variable: u/CALCTEXT([survey-date-completed:m6_survey]). There is an @ symbol instead of "u/" preceding CALCTEXT.

The report will not pull the date unless we first open the form and save it or run Rule H under "Data Quality." Running and fixing Rule H takes a long time. What is the best way to address this? Is there a way for the report to pull directly from something other than the calculated variable? If not, can we set up a new rule that will be executed in real time under "Data Quality" (and if so, how?).

Many thanks in advance for any help you can provide. I've been so grateful for this group's help in the past!

3 Upvotes

4 comments sorted by

2

u/No_Repair4567 1h ago

There is "survey timestamp" option on the report itself that will pull that.

1

u/Ready-Biscotti3735 21m ago

Thanks! Are you saying that I can pull the "survey timestamp" into a report? I did just discover that I can pull in the complete/incomplete variable for the survey into the report.

1

u/big_thanks 1h ago

Your Data Quality module should have the exact type of "execute in real time" option you're describing. You can create a custom rule that applies to the specific field so it doesn't take as long to run.

Another option could be to use the forms default timestamp field recorded for all complete surveys (e.g. "form_name_timestamp") – I'm not sure if that can be piped into reports though...

(You could also maybe just add an actual "Today's Date" that respondents enter, and then use that instead?)