I am new to RedCap and I have no idea how to set it up. I want to build something like this:
How many people go in? X -> opens up X fields
Did person 1 use A?
- How many A did they use?
- How many A did they waste?
Did person 2 use A?
- How many A did they use?
- How many A did they waste?
…all the way to X
I’ve only been able to create multiple fields
I’ve tried IF statements but I can’t seem to find the function to open new fields
Based on your description (and perhaps there's more information missing here), this might not be possible unless you know ahead of time what your maximum number of people who enter a room can be (let's say 100 for an example). And let's say you have a variable called
room_populationto represent the number of people in the room. If you knowroom_populationcan never exceed 100, you can create a series of variables calledperson1_A_usethroughperson100_A_useto represent each person's use of A, a series of variables calledperson1_A_quantitythroughperson100_A_useto represent how much of A each person uses, and a series of variables calledperson1_A_wasteall the way up toperson100_A_wasteto represent how much of A each person wastes. Then modify each variable with branching logic so that it is only displayed if the value ofroom_populationexceeds a certain threshold. For example,person2_A_use,person2_A_quantity, andperson2_A_wastewould only appear ifroom_population > 1.You cannot design an instrument in REDCap where the number of potential variables is unknown and changes on the fly. If the people in the room were self-reporting this information through a survey link for instance, it would be a lot easier to do in REDCap. Your other option would be to create a repeating instrument that has the three variables to represent A use, quantity of use, and waste, and just create a new repeating instance for each person. At the end, the count of those repeating instances would give you how many people were in the room. But depending on what exactly your project entails, this may not be feasible since only one repeating instrument can be modified at a time (which can be a problem if you need to observe multiple people simultaneously, or if use of A needs to be tracked over a duration of time).