Two questions regarding Form Display Logic

84 views
Skip to first unread message

Wijnand Van Den Boom

unread,
Feb 5, 2024, 4:44:26 PMFeb 5
to Redcap Open
Hi I have 2 questions related to Form Display Logic.

1. Can I make a rule based on a "signature" field? So, for example a participant can only go to the next form if they have signed.

2. Can you make a rule based on a field in a Repeated Form? Or do you need to define the instance as well? Right now, every form after a Repeated Form wil be activated, no matter what the input is (might has to do with instances?)

Thanks so much

Cheers
Wijnand

Florence Breslin

unread,
Feb 6, 2024, 2:16:08 PMFeb 6
to Redcap Open
1. yes, make the field required and then they can't proceed without it. I also do a branching logic note at the bottom of the form that says "To proceed you need to sign above, in green on the side of the screen it says "Add signature", click on that text and sign with your finger or mouse." and then set the branching logic to [signature]='' to say if the signature is empty display this message. It goes away once they have saved the signature.

2. I'm not sure I understand this question. Do you mean if in a repeated instrument the responder says "no" and you want the surveys to stop? If so I would use the external module "form render skip logic". If you can give an example, I might be able to provide more help.

Florence

Wijnand Van Den Boom

unread,
Feb 6, 2024, 2:49:05 PMFeb 6
to Florence Breslin, Redcap Open
Thanks Florence.
My responses below are in blue.
Cheers
Wijnand

1. yes, make the field required and then they can't proceed without it. I also do a branching logic note at the bottom of the form that says "To proceed you need to sign above, in green on the side of the screen it says "Add signature", click on that text and sign with your finger or mouse." and then set the branching logic to [signature]='' to say if the signature is empty display this message. It goes away once they have saved the signature.
I'm going to try whether including [signature]<>'' as a rule in the Form Display Logic feature, to activate other forms, will work in REDCap.

2. I'm not sure I understand this question. Do you mean if in a repeated instrument the responder says "no" and you want the surveys to stop? If so I would use the external module "form render skip logic". If you can give an example, I might be able to provide more help.
"form render skip logic" is probably what I mean by "Form Display Logic"?
For example, if you have 2 instances (and you use field "report1" to record data for each instance), then how can you use Form Display Logic?
In order to go to the next form "hh_ses_20" should be for all instances.
However, instance 1 can have No and instance 2 can have Yes.
In this situation REDCap will still show the next form.
How can I deal with this?

Field to activate instance
image.png

Field that I want to use in a rule for displaying the next form (only activate next form if hh_ses_20==Yes)
image.png


--
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 on the web visit https://groups.google.com/d/msgid/redcap_open/cba6867e-906f-4329-a36f-f286c1c507afn%40googlegroups.com.


--
Wijnand Van Den Boom
Sr Social Science Research Data Analyst
Research Program on Children and Adversity
Boston College School of Social Work
McGuinn Hall 100
Visit our website

Rani E Dalgin

unread,
Feb 6, 2024, 7:54:13 PMFeb 6
to Wijnand Van Den Boom, redcap open, dal...@bc.edu
Hi Wijnand and Florence,

Florence - Thanks for your excellent suggestions. Please see my notes in green below. 

Wijnand - if you have additional questions please let me know and if desired - I will also share the solutions with this community.

Wijnand - if you would like to meet I would be glad to do so.

Thanks,
Rani

Rani  Ewen Dalgin, MSW, M.Ed.
Manager, Research Data Consultation & Acquisition
Lead Academic Qualtrics and REDCap Administrator
Research Services, Information Technology Services
Boston College
office: 617-552-1743
mobile: 781-801-3918
pronouns: she/her/hers


On Tue, Feb 6, 2024 at 2:49 PM 'Wijnand Van Den Boom' via Redcap Open <redca...@googlegroups.com> wrote:
Thanks Florence.
My responses below are in blue.
Cheers
Wijnand

1. yes, make the field required and then they can't proceed without it. I also do a branching logic note at the bottom of the form that says "To proceed you need to sign above, in green on the side of the screen it says "Add signature", click on that text and sign with your finger or mouse." and then set the branching logic to [signature]='' to say if the signature is empty display this message. It goes away once they have saved the signature.
I'm going to try whether including [signature]<>'' as a rule in the Form Display Logic feature, to activate other forms, will work in REDCap.

RD: Wijnand - please let me know if this works for you. 

2. I'm not sure I understand this question. Do you mean if in a repeated instrument the responder says "no" and you want the surveys to stop? If so I would use the external module "form render skip logic". If you can give an example, I might be able to provide more help.
"form render skip logic" is probably what I mean by "Form Display Logic"?
For example, if you have 2 instances (and you use field "report1" to record data for each instance), then how can you use Form Display Logic?
In order to go to the next form "hh_ses_20" should be for all instances.
However, instance 1 can have No and instance 2 can have Yes.
In this situation REDCap will still show the next form.
How can I deal with this?

Field to activate instance
image.png

Field that I want to use in a rule for displaying the next form (only activate next form if hh_ses_20==Yes)
image.png

RD: I do not recommend using Form Display Skip logic. That was incorporated into the main version of REDCap with REDCap Release 12.0 in 2021. The issue of Form Display Logic having problems with multiple instances is documented. From the REDCap Consortium Web pages here is a possible workaround:

"A first instrument asks whether the respondent has done any of several activities, and if checked, FDL enables the instruments pertaining to the activities.

If this is helpful for anyone else, the combination of settings that worked for us is as follows:

  • Form Display Logic uses [last-instance] to check whether the respondent had responded 'yes' to the various activities in the current instance of the event, as it should always be the last instance. This requires a particular setup, and worked for us only because upon completion of the first instrument (the 'which activities did you do today' instrument), its values are all [last-instance].
  • The option in Form Display Logic to 'Keep forms enabled if they contain data' is unchecked.

[current-instance] in the logic fails because as noted above, FDL is not being executed within instance context. If it is used in the logic, then it is ignored, and the fallback position is to use the first instance. This means that each successive day, regardless of the activities selected, the respondent is taken to instruments based on their first daily activities recorded.

If 'keep forms enabled' is checked, then even if that activity was not checked for the current day, if it had ever been checked, then the form will be enabled. Effectively, irrespective of the current day's activities, when an activity is checked and that instrument enabled, it would always be enabled thereafter.

As a result, we lose the ability to navigate through previous instances of instruments, and so cannot view the responses individually, although the data is of course still there and accessible via reports and other means. 

As you can see from the screenshot below, the last instance now trumps the others in terms of enabled instruments. Prescribe drugs and Sell sunblock are enabled across the board since they were enabled in the [last-instance] of the Activities event. Once a new instance of the event is saved, that instance now dictates the enabling of instruments, so for respondents completing this, the behaviour is exactly as intended.

I haven't tested FDL with repeating instruments as opposed to events, but I would imagine the exact same limitations apply."

 
 
Reply all
Reply to author
Forward
0 new messages