Page 1 of 2

Sub-Items

Posted: February 22nd, 2016, 6:38 am
by MrTaco
Hi Guys

I have created subitems but not in a roster form, now i get this message(refer to the attached file),
when i create my form. your help will be highly appreciated.

Regards
Thabiso

Re: Sub-Items

Posted: February 22nd, 2016, 8:09 am
by josh
This is because you already have the item on the form. You can't have both the item and the subitem on the form. Remove the item and then drop the subitem on the form again.

Re: Sub-Items

Posted: February 23rd, 2016, 1:35 am
by MrTaco
hey Josh i did that but it also doing the same thing, i think it only works on numeric than alphanumeric....
bcoz on numeric it works fine

Re: Sub-Items

Posted: February 23rd, 2016, 7:51 am
by josh
Subitems work with both alpha and numeric. Make sure that the item isn't on any other form in your application.

Re: Sub-Items

Posted: February 23rd, 2016, 8:07 am
by MrTaco
Please check the sample i did......

Re: Sub-Items

Posted: February 23rd, 2016, 1:48 pm
by josh
In the example you posted your subitems overlap so you can have only one of them on the form. Q1_1_1_LINE_ONE starts at position 3 and is 30 long and Q1_1_2_LINE_TWO starts at position 5 so it is occupying the same space in the dictionary. You can see this clearly if you look at the layout view in the dictionary editor.

The general rule is that if two variables on the form key to the same digit in the dictionary then only one of them can be on the form. So you can't have both the child item and the parent item on the form and you can't have two sub-items that overlap on the form.

Re: Sub-Items

Posted: February 24th, 2016, 5:03 am
by MrTaco
Hi Josh
Finally i managed

Thanks

Re: Sub-Items

Posted: February 25th, 2016, 5:47 am
by MrTaco
Hi Guys

I have been trying to labels using:

PROC PERSON

setocclabel(PERSON,strip(PERSON_GENDER)))curocc());

but am getting this message:
ERROR: A multiply occurring group (or form) is expected near line 3 in PERSON procedure

what is it that am missing.

Re: Sub-Items

Posted: February 25th, 2016, 7:04 am
by josh
The index needs be in parentheses after the group name i.e. PERSON(curocc()) and not after the label as you have it.

In addition setocclabel requires the group name (name of the roster) and not the name of the dictionary record. Without seeing your app I cant tell if PERSON is the group name but if you haven't modified the name in the forms tree then chances the group name is PERSON000. The code below should work but you will need to verify that PERSON000 is the group name by looking at the roster name in the form tree.
setocclabel(PERSON000(curocc()), strip(PERSON_GENDER));

Re: Sub-Items

Posted: February 25th, 2016, 7:46 am
by MrTaco
Hi Josh here is the Application...