@Set-Value Action Tag Issues

7 views
Skip to first unread message

Shreenidhi Sharma

unread,
Jan 6, 2026, 3:25:14 PM (4 days ago) Jan 6
to Redcap Open
Hi all, 

Happy New Year!

I’m reaching out because I’m having trouble getting an @SETVALUE action tag to populate correctly.

We currently have ~100 records in the project with multiple instruments. In the first instrument (Patient Tracking), we collect the patient group. We also use a repeated instrument for a Communication Log. We realized it would be helpful to generate a report that filters the most recent communication log by patient group.

Because pulling data directly from repeated instruments can be tricky, I created a patient group variable within the Communication Log instrument and used @SETVALUE to pull the value from the Patient Tracking form. However, the value is not populating in the Communication Log.

I understand that existing communication logs would not auto-populate unless the form is reopened, but even newly created communication log entries are not having the value set.

I’m wondering if this may be related to the fact that the Patient Tracking form already had data entered prior to creating the new field in the Communication Log, though I’m not entirely sure. Do you have any suggestions for troubleshooting or insight into what might be causing this?

Thank you in advance for your help!

Best,
Shreenidhi


Thanks in advance! 
Shreenidhi 

Ken Eaton

unread,
Jan 6, 2026, 5:53:54 PM (4 days ago) Jan 6
to Shreenidhi Sharma, Redcap Open
Can you give an example of the code you are using and the field you are pulling data from? If the top of my head the only things I can think of is that you might be pulling from a radio button field where you need to add :value. i.e. [field-name:value].

Another possibility is that you might need to add the event-name for the Patient Tracking instrument if it is in a different event. 

Sincerely,
Ken Eaton

--
You received this message because you are subscribed to the Google Groups "Redcap Open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redcap_open...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/redcap_open/2b806640-4e5d-4105-b6a8-7d3a4678aee8n%40googlegroups.com.

Shreenidhi Sharma

unread,
Jan 7, 2026, 9:53:52 AM (3 days ago) Jan 7
to Ken Eaton, Redcap Open
Hi Ken, 

Sure! My code is: @SETVALUE='[baseline_arm_1][pt_type:value]'. I am using the :value and also the event name. 
My code in the report is [current-instance] = [last-instance] and [current-instance] <> ""

Thanks in advance! 
Shreenidhi 
--

 Shreenidhi Sharma, MPH

 Data Manager

 Hassenfeld Institute | Brown University School of Public Health

 Pronouns: She/Her/Hers

shreenid...@brown.edu
https://hassenfeld.brown.edu

Ken Eaton

unread,
Jan 7, 2026, 10:24:42 AM (3 days ago) Jan 7
to Shreenidhi Sharma, Redcap Open
Shreenidhi,

Your code looks correct to me and your report criteria should pull the most recent instance from the communication log. (Right now probably not pulling any rows if the code isn't working...) I'm on vacation away from my work computer and Redcap, so this is just my thoughts... Try replacing @SETVALUE with @CALCTEXT. to see if that works. I believe you can run rule H in data quality to correct the previously entered communication log entries. Of course, @CALCTEXT would need to work for your case to populate the older records.

Sincerely,
Ken Eaton

Shreenidhi Sharma

unread,
Jan 7, 2026, 11:14:18 AM (3 days ago) Jan 7
to Ken Eaton, Redcap Open
Thanks Ken- I hope you are enjoying your vacation! I believe CALCTEXT only works for open text fields and my pt group variable is a radio button. 

Best,
Shreenidhi 

Amit Tandon

unread,
Jan 7, 2026, 11:36:00 PM (3 days ago) Jan 7
to Redcap Open
Shreenidhi

Yes. @CALCTEXT only works for text fields. To check the correctness of your code
1. Check the options obtained from @SETVALUE match the options in your drop-down question to be populated
2. Paste  [baseline_arm_1][pt_type:value]  in one of your question labels and check in your preview mode. Do not use quotes
Reply all
Reply to author
Forward
0 new messages