Thank you for your reminder.
But I can't solve the code problem myself, otherwise I'd still be inclined to add an extra categories name field to solve my problem.