Dynamically populating a dropdown based on the value of another dropdown

Dynamically populating a dropdown based on the value of another dropdown

I am trying to emulate the functionality of populating a field

based on the value of another field on a form as outlined in your

tutorial "Populate the Assign To field based on the module name

change" shown on this page:
http://creator.zoho.com/help/getting-started/bug-tracker-for-online

-tutorial.html#populate

I have a form with 2 dropdown menus on it, "Question Type" and

"Topic". Both are lookups that are fed by their own respective

tables, "QuestionTypeLookup" and "TopicsLookup".

Each entry in "TopicsLookup" has an assignment from

"QuestionTypesLookup". For example the value "printer" has a

question type assignment of "PC".

On my form, I would like the Topic dropdown to only have values

based on the choice of the "QuestionType" field (radio buttons). 

I've tried to adapt the tutorial example in my solution and can't

seem to make it work.  On the "QuestionType" field I've applied

this script to "Actions on User Input":

if (count(TopicsLookup[TopicLookup == input.ChooseTopic])  ==  0)
{
    clear ChooseTopic;
}
else
{
    for each r in TopicsLookup  [TopicLookup == input.ChooseTopic]
    {
        ChooseTopic:ui.add(r.TopicLookup);
    }
}

The "Topic" select dropdown always winds up being empty after I

make a selection on the "QuestionType" radio buttons.  I feel like

I'm close, but am stuck at the moment.  Any help out there is

greatly appreciated!