I think you've already identified the issue is related to the content order in the InDesign story that flows across the frames.
You'll need to change this content order so that the Product name is after the last feature point. E.g.:
And the TOC will look like this when generated:
I must admit it seems rather strange to want the product codes listed PRIOR to the product name, as my guess is the structurally/logically the product codes are falling 'under' the Product Name specified. That is also how you are visually presenting it in the layout. E.g. I would have expected the Product Name to be a level 1 entry structurally and Product Code level 2.
Thank you so much for your reply. My client like to have the product codes before the product names in this product index. So their customers can find the products in the catalogue easily based on the product codes.
I have to apologize that my sample file is a bit misleading. The real file is way more complicated than this, and most of the pages are slightly different. Thus I have given up on having the product codes listed prior to the product name. They will be manually moved around.
The issue I need to resolve now is to have the product listing in an alphabetical order based on the product codes. And the correct product names to go with them.
Have you thought of giving your client TWO different table of contents in that case?
One that only contains product codes, the other only product names.
You can even alphabetize the product codes, or product names if needed.
You can have multiple table of contents in the single InDesign document, by defining them (Layout > Table of Content Styles), then when adding the ToCs you'd select relevant one from the TOC Style menu when using Layout > Table of Contents to place the ToC in your document.
Actually it's not a bad idea. With the original setup, it difficult to find a particular product if the person knows only the product name. With 2 different indexes, it should be easier for everyone. I'll try this with my client first. Thank you so much Cari.