avertissement(1008)

Discussions about CSEntry
Post Reply
SAM
Posts: 3
Joined: April 25th, 2021, 11:09 pm

avertissement(1008)

Post by SAM » April 25th, 2021, 11:27 pm

Dear Cspro Staff,
I am designing a collection application where I use two records where each record is a roster within a roster. However every time I'm in the second record and I want to go back one, I get this warning :

avertissement(1008)
Invalid subscript :

What is due to this? Because I've been looking for the source of the problem for weeks and I haven't found anything. And is there any way to disable this warning?
Please I need help or advice.
Attachments
Capture.JPG
Picture of the avertissement
Capture.JPG (19.27 KiB) Viewed 200 times

Gregory Martin
Posts: 1445
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: avertissement(1008)

Post by Gregory Martin » April 26th, 2021, 1:41 pm

It's hard to know what exactly the problem is without seeing your program. The subscript (0) is definitely invalid because CSPro subscripts are one-based. If you want, send your application to cspro@lists.census.gov and we can try to determine what the problem is.

SAM
Posts: 3
Joined: April 25th, 2021, 11:09 pm

Re: avertissement(1008)

Post by SAM » April 27th, 2021, 6:12 am

Than Gregory for responding me.
I finally understood the problem. As I explained, I have a record, which is actually a roster, and inside this record, I have another roster (formed from the subitems). When I fill a new questionnaire, there is no problem. But once I pass the roster which I am taking about, and I'm in another record that doesn't repeat, when I go back, the curroc() of the roster formed from the subitems returns 0.
Help me to resolve this problem please.
I attached some pictures for more details, if needed, I can submit the whole program.

Thanks.
Attachments
image3.JPG
image3.JPG (14.27 KiB) Viewed 160 times
image2.JPG
image2.JPG (49.25 KiB) Viewed 160 times
image1.JPG
image1.JPG (43.35 KiB) Viewed 160 times

Gregory Martin
Posts: 1445
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: avertissement(1008)

Post by Gregory Martin » April 27th, 2021, 12:43 pm

Working with repeating items/subitems on repeating forms can sometimes be tricky. However, your code looks fine.

I tested using curocc on a repeating form/subitem and it worked for me, even going backwards and also in modify mode. I'm running in system-controlled mode.

If you can send your application to greg@csprousers.org I can look at what is happening.

SAM
Posts: 3
Joined: April 25th, 2021, 11:09 pm

Re: avertissement(1008)

Post by SAM » April 29th, 2021, 11:08 am

Thank you for your interest in my problem.
I finally solved the problem by deleting the last item of the first roster (ID flat verification).
I didn't really need it and by chance when I deleted it, everything works perfectly.
But I find it very weird that such a problem occur in this situation.
Thanks

Post Reply