Multiple response

Discussions about CSEntry
Post Reply
sham
Posts: 69
Joined: February 3rd, 2022, 7:30 pm

Multiple response

Post by sham »

Hi family,
I have multiple choice question variable and i need your support for this logic;
example

Q1. Select the best 3 or up to 3 crops in the following crops types (Multiple Reponses is allow)
A. YAM
B. Rice
C. Bean
D. Cassava
E. Millet

How do I restrict to allow the enumerator to select a maximum of 3 options.?

Thank you.
Sham
etuser
Posts: 86
Joined: September 3rd, 2019, 5:57 am

Re: Multiple response

Post by etuser »

Declare Q1 as an alpha with a length of 3 and make it checkbox to accept multiple response
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Multiple response

Post by htuser »

A better way, in the postproc
if length (strip ($)) >3 then
    errmsg
(239);
    reenter $;
endif;
239 You can't select more than three crops. Please, reenter Q1.

I don't test if the reenter will work right now. Please test it.
Hope this help.
G.VOLNY, a CSProuser from Haiti, since 2004
Post Reply