Out of Range !

Discussions about CSEntry
Post Reply
VirtuesArios
Posts: 32
Joined: June 2nd, 2022, 5:55 am

Out of Range !

Post by VirtuesArios »

Hello CSPro users, just like to share if anybody had the same problems that I have, it has a combo box
every time the users choose 20, 25, 40 and 50 it has an "Out of Range Error"

Code: Select all

5.11 Male child care (Feeds the children)
(Did not do activity)	0.00	
15 minutes	0.25	
20 minutes	0.33	x
25 minutes	0.41	x
30 minutes	0.50	
35 minutes	0.58	
40 minutes	0.66	x
45 minutes	0.75	
50 minutes	0.83	x
55 minutes	0.91	
			0.92	60.99
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Out of Range !

Post by sherrell »

I'm not quite clear what you're doing. Could you post your application, or at least explain what the dictionary valueset looks like and what logic, if any, you have associated with this variable? thnx
VirtuesArios
Posts: 32
Joined: June 2nd, 2022, 5:55 am

Re: Out of Range !

Post by VirtuesArios »

Thanks sherrell for replying as attach to this thread the dictionary and the valueset image, what I was trying to do is just convert minutes to seconds or (e.g. 15/60 = 0.25) for statistical purposes) so that the Field Interviewer would choose the said answer of the respondent, as you can see in the dictionary in the value label is in minutes and in from it is already converted but if I choose 20, 25, 40 and 50 minutes it will give out an "Out of Range" but only on this said value/answer and no logic or whatsoever on this variable.
CSPro Dictionary.jpg
CSPro Dictionary.jpg (250.58 KiB) Viewed 11235 times
CSPro ValueSet.jpg
CSPro ValueSet.jpg (166.38 KiB) Viewed 11235 times
aaronw
Posts: 565
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Out of Range !

Post by aaronw »

I was able to reproduce the issue and will need to look into it further. My suggestion is to store the values as whole numbers and then take an additional step to convert them to their decimal value.
VirtuesArios
Posts: 32
Joined: June 2nd, 2022, 5:55 am

Re: Out of Range !

Post by VirtuesArios »

aaronw wrote: December 12th, 2022, 10:35 am I was able to reproduce the issue and will need to look into it further. My suggestion is to store the values as whole numbers and then take an additional step to convert them to their decimal value.
Thank you aaronw for the suggestion and taking up on this matter.
VirtuesArios
Posts: 32
Joined: June 2nd, 2022, 5:55 am

Re: Out of Range !

Post by VirtuesArios »

aaronw wrote: December 12th, 2022, 10:35 am I was able to reproduce the issue and will need to look into it further. My suggestion is to store the values as whole numbers and then take an additional step to convert them to their decimal value.
Hi aaronw or anyone in the forum that could give me an idea on how do I get the value if the user choose an answer (e.g. 15 minutes)
aaronw
Posts: 565
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Out of Range !

Post by aaronw »

I could imagine a couple different approaches that each require an additional post-data collection step.

Idea 1: Remove the decimal from the value sets, and add it back later.
(Did not do activity) | 0.00
15 minutes | 25
20 minutes | 33
25 minutes | 33
Then the additional post-data collection step is to multiple the value by 0.01.

Ideal 2: Store the time as minutes, and map it to the decimal value later.
(Did not do activity) | 0
15 minutes | 15
20 minutes | 20
25 minutes | 25
Then use an if else statement to map the values.
numeric mapped_value;
if E11A = 0 then
   
mapped_value = 0.0;
elseif E11A = 15 then
   
mapped_value = 0.25;
elseif E11A = 20 then
   
mapped_value = 0.33
// etc
else
   
mapped_value = 0.92
endif;
VirtuesArios
Posts: 32
Joined: June 2nd, 2022, 5:55 am

Re: Out of Range !

Post by VirtuesArios »

@aaronw, Thank you very much your such a great help

Cheers
Post Reply