>>>if type('_screen.activeform.parent.class') = 'C'
>>>
>>>should distinguish between formset/form...
>>
>>Or, more precisely if type('_screen.forms[i].parent.name')="C" and _screen.forms[i].parent.baseclass="Formset"
>
>I used type('_screen.forms(n).parent.class') = "C" for _screen.formcount > thisformset.formcount. It works as the type equals "C" only in the case of a formset, since forms have no parent, and type is something, but not "C". The above would also determine the same point, that a parent to the given form exists.
There are several different ways to attack this using TYPE, depending on what you need to do. They all have in common that TYPE() will be 'U' (Undefined) if TYPE cannot reference the parameter...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.