How to pass dynamic value on repeat_count field?


#1

If i pass dynamic value from an external app the repeat count is not working.


(Grzegorz Orczykowski) #2

Hi @jovel

could you explain your problem better? I don't really understand what's going on.


#3

Hello @Grzesiek2010 , the goal is to pass a dynamic value for repeat_count under repeat group. lets say the value is coming from an external app. Can we control that programmatically with a setter?


(Grzegorz Orczykowski) #4

It's not possible to pass such a value using an external app. You can specify repeat_count with a number like you have in your example or using a value from another question or calculation (from the same form) and that's all.


(Dr. Gareth S. Bestor) #5

You may be able to accomplish this using an external app to populate this 'another question'. See Launching external apps to populate single fields.

[disclaimer: I've not tried this myself, but its probably worth investigating. - Gareth]


#6

I was able to achieve it, but i encountered problem when displaying the question under the repeat group. On the hierarchy view the counts are correct, but when i load the repeat section it was skipping the questions. Will update you accordingly currently checking it.


(Dr. Gareth S. Bestor) #7

Great! Could you describe how? (for the benefit of our listeners... :slight_smile: )


(Grzegorz Orczykowski) #8

Ok, now I understand your problem better.

You can try this form: counter.xlsx (5.3 KB)

with: ODK Counter

It allows to take a number form ODK Counter and set up repeats based on that value.