Tried to select automatically using by position(..), but failed

Hi All,

please see the table below. I designed it within repeat and I tried to select nutrition program automatically using by position(…), but it failed and returns the error msg “java.lang.Integer cannot be cast to org.javarosa.core.model.data.helper.Selection”. It works with enketo but not working with KoboCollect / ODKCollect. do you know the reason or how to fix this issue?

repeat group

type | name | label | calculation

select_one l300 | q300 | 300. Type of nutrition program | position(…)

end repeat

  1. Type of nutrition program

301. In the last 12 months h ave you, your spouse or any other person in your household been reached by any of the following programs related to household nutrition?

  1. If ‘yes’ to Q301, what were the messages learned from the programs? (Use code 302) (Multiple option is possible)
  1. Yes 0) No 88) DK
  1. Live theater through Drama group (Oromiya & Afar)

Live theater through Circus & Drama group (Somali)

  1. Key hole Garden demonstration (Oromiya & Afar )

Community dialogues on nutrition

Education theater during the trade Fair

  1. Nutrition counseling through HEW or HW

  2. Nutrition counseling through CHV (Somali)

  3. Training for mothers

Solution is **string(position(…)) instead of **position(…).

···

On Monday, July 13, 2015 at 12:53:48 PM UTC+3, Enkhbayar S wrote:

Hi All,

please see the table below. I designed it within repeat and I tried to select nutrition program automatically using by position(…), but it failed and returns the error msg “java.lang.Integer cannot be cast to org.javarosa.core.model.data.helper.Selection”. It works with enketo but not working with KoboCollect / ODKCollect. do you know the reason or how to fix this issue?

repeat group

type | name | label | calculation

select_one l300 | q300 | 300. Type of nutrition program | position(…)

end repeat

  1. Type of nutrition program

301. In the last 12 months h ave you, your spouse or any other person in your household been reached by any of the following programs related to household nutrition?

  1. If ‘yes’ to Q301, what were the messages learned from the programs? (Use code 302) (Multiple option is possible)
  1. Yes 0) No 88) DK
  1. Live theater through Drama group (Oromiya & Afar)

Live theater through Circus & Drama group (Somali)

  1. Key hole Garden demonstration (Oromiya & Afar )

Community dialogues on nutrition

Education theater during the trade Fair

  1. Nutrition counseling through HEW or HW
  1. Nutrition counseling through CHV (Somali)
  1. Training for mothers

Did you solved this, I am aslo getting the same problem in KoboCollect

Kajiba

Hi @jkajiba,

Could you describe your issue in detail so that we could help you with with some way out for the problem that you are facing.