Error regarding looping form?

Discussions about CSEntry
Post Reply
mashour
Posts: 14
Joined: October 13th, 2015, 10:26 am

Error regarding looping form?

Post by mashour »

Hi,

I was wondering if someone could help me understand the following error that popped up in the CSPro designer.

"You cannot drop an unkeyed item from a single record onto a form that loops"

I was just reviewing a form when I noticed that an item/question was missing, even though it had been there earlier that day. I figured I must have accidentally deleted it from the form, so I tried to drag it onto the form from the dictionary. Normally when I drag an item/roster it just moves onto the form. Instead I got the message above. I don't even know how to create a looping form if I wanted, so I am not sure what I clicked to cause that. I ended up reverting to a backup from 15 mins before and continued to use that without a problem. However I would love to know what could have caused this error and how to fix it for future reference!

If it helps, the form only contains non-repeating/single occurrence items. There are no rosters in the form and the record in which the item is contained has a max occurrence 1.

Thanks!

M
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Error regarding looping form?

Post by josh »

A looping or repeating form is a form that gets displayed for each occurrence of a repeating item or record. When you have a record or item that repeats you have the option of using a roster or a repeating form for entering data. With a roster, all the occurrences are displayed in the same form, one in each row of the roster. With a repeating form you don't have a roster, instead each occurrence is shown on a separate copy of the form. If a form is repeating you will see a little red circle on it in the forms tree.

A looping form gets created when you drop a repeating record or item onto a form and you choose "don't roster". You can also create a looping form if you drop an item from a repeating record (or a subitem of a repeating item) onto a form and you have "don't roster" set as the default in the drag options.

Once a form is looping then you can't also place singly occurring items onto it. If you had a singly occurring item on a repeating form it wouldn't make sense since you would be forced to enter the value of the same singly occurring item multiple times. So dropping a singly occurring item onto a repeating form is what would normally give you the error message that you are seeing.

If all the items on your form are singly occurring then you shouldn't be getting that message. There could be a bug or possibly you had a repeating item on the form and later removed it but the form was still marked as looping. If you set the default in the drag options to be to roster instead of "don't roster" then you shouldn't ever create repeating forms and you shouldn't the error message in the future.

If it does look like this is a bug and you have a set of repeatable steps to reproduce it please let us know and we will fix it.
Guest

Re: Error regarding looping form?

Post by Guest »

josh wrote: If it does look like this is a bug and you have a set of repeatable steps to reproduce it please let us know and we will fix it.
I just wanted to follow up and see if anyone was able to get to the bottom of this. Please let me know if you would like me to share the files again where the problem appears. Thanks.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Error regarding looping form?

Post by josh »

Do you have steps to repeat it?
bajolasruedas
Posts: 1
Joined: April 27th, 2016, 11:25 am

Re: Error regarding looping form?

Post by bajolasruedas »

I have the same error. But I've noticed is that it only happens the sheet of the questionnaire, which I am working. I want to say that the error only happens when I pull the question to the same sheet where to delete it.
kompiler
Posts: 29
Joined: January 25th, 2017, 12:38 pm

Re: Error regarding looping form?

Post by kompiler »

Hi,

I have also encountered this error. Here are the steps after which the error occurred:
1. Dictionary with a single record with one occurrence was created.
2. The form (for this record) was generated.
3. Some items in the dictionary were moved to the new record with multiple occurrences.

After that, neither the items from a single occurrence record were able to be added to the form, nor the new multiple occurrence record's items.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Error regarding looping form?

Post by josh »

I tried those steps and was not able to reproduce the problem where items from both records can't be dropped. Once I move the items to the multiple record, the form becomes a repeating form (you can see the little red circle in the form tree). At that point I can drag and drop items from the multiple record but not from the single record which makes sense since the form is repeating. However, it does leave fields from the single record on the repeating form which is not correct. This is a bug that we will fix.

In any case, if you get into a situation like just delete the form and recreate it again and you should be able to
Post Reply