There are a number of different ways you could use to set this up. Since you have a portal, there must be at least two table occurrence "boxes" on the relationships tab in Mange database and you might have more. What have you set up as relationships for your portals?
Are you using portal filters? If so what filter expression are you using?
Type0 just has a "1" in it to make the main category menu on tab.1
You can probably use a relationship with the cartesian join operator (X) instead of the default = operator and then not need the Type0 field.