What you desribe can be accomplished without any scripting. This is called a "conditional value list".
Forum Tutorial: Custom Value List?
Knowledgebase article: http://help.filemaker.com/app/answers/detail/a_id/5833/kw/conditional%20value%20list
i got one conditional value list that work using philmodjunk file Conditional values list demo 31/2/2011 and work ok just like to add a new conditional value list before the one i got Category
one with model that then update the category and the update the portal
model > category > display information in portal