How to record whether or not a user has completed a particular section of the intervention (e.g. a questionnaire)

From Lifeguide Wiki
Jump to: navigation, search

savevalue can be used to record when users complete a specific part of your intervention. For example, you may want to record whether users have completed the baseline questionnaire so you know if they can move on to the next part of the intervention.

To do this, type the following line in the logic when you want to save the questionnaire as 'complete' (this may be after the last page of the questionnaire or earlier if all of your questions are not mandatory).

savevalue(username, "baseline_done", "yes")


You can then load the variable baseline_done so that if it has been saved as yes (i.e. the baseline questionnaire has been finished), users are directed to the session page:

after login if (loadvalue(username, "baseline_done") = "yes" ) goto sessionpage


If you only want a specific group to see the session pages, you can add an extra line of logic:

after login if (and( loadvalue(username, "baseline_done") = "yes",... loadvalue(username, "group") = "group1"... goto sessionpage

N.B. You must have saved the variable group in the logic in order to load this variable.

If you add the baseline_done logic as above, you will find this variable in the User Details sheet of the Excel Spreadsheet that you export. Please [click here] for information on how to export the User Data sheet.