Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_logic_for_other will not work with condition such as selected(${main_reason_left_country} #69

Open
yannsay-impact opened this issue Sep 13, 2023 · 1 comment

Comments

@yannsay-impact
Copy link
Collaborator

yannsay-impact commented Sep 13, 2023

kobo_example <- data.frame(type = c("text", "select_one main_reason_left_country_list"),                                                                                 
                           name = c("main_reason_left_country_other", "main_reason_left_country"),                                                     
                           label = c("What is the main reason for which you and your household left your country of origin?",
                                     "What is the main reason for which you and your household left your country of origin?"),
                           relevant = "selected(${main_reason_left_country}, \"other\")")
create_logic_for_other(kobo_survey = kobo_example)

image

kobo_example <- data.frame(type = c("text", "select_one main_reason_left_country_list"),                                                                                 
                           name = c("main_reason_left_country_other", "main_reason_left_country"),                                                     
                           label = c("What is the main reason for which you and your household left your country of origin?",
                                     "What is the main reason for which you and your household left your country of origin?"),
                           relevant = "selected(${main_reason_left_country}, 'other')")
create_logic_for_other(kobo_survey = kobo_example)

image

@yannsay-impact
Copy link
Collaborator Author

kobo_example <- data.frame(type = c("text", "select_one main_reason_left_country_list"),                                                                                 
                           name = c("main_reason_left_country_other", "main_reason_left_country"),                                                     
                           label = c("What is the main reason for which you and your household left your country of origin?",
                                     "What is the main reason for which you and your household left your country of origin?"),
                           relevant = "selected(${main_reason_left_country}, \"other\")")
kobo_example$relevant <- stringr::str_replace_all(kobo_example$relevant, "\"", "'")
create_logic_for_other(kobo_survey = kobo_example)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant