A different design approach will make life much simpler for you.
Here's a very simple approach, more sophisticated setups are possible and may be better yet, but let's keep it simple to start:
Set up a table, Questions, with fields such as:
Question, Response, RespondantID
Set up a second table, Respondants, with the fields: Name, (any other fields you need to identify one person responding to your survey), RespondantID (auto-entered serial number)
Link the two tables:
Respondant::RespondantID = Questions::RespondantID
In your Questions table, you'd enter text such as "icecream, cake, chocolate, candy ... " in separate records of the questions table for a given respondant. (Here's where you may want your final database to have even more tables, so you don't have to do so much to set up a survey for a new respondant)
Your survey takers would then enter a number in the Response field to rank their responses for each item. You can format the response field with radio buttons, check boxes or a dropdown/pop up menu if you want.
This is just a simple outline of the basic idea. There are many threads in the forum that already discuss using filemaker to manage surveys. Click the advanced search link at the top of your screen and use "survey" to search the forum. You should find several good examples that take this idea into much more detail.
I realized that there must be something wrong deeply rooted, thanks for telling me the correct implementation for database applications, as I was coming from a procedure programming background. Your suggested database structure is just much more reasonable and I've beat my head for unable to figuring it out. However, the problem some how shifted to how to build a layout for data entry. I'll do the search to see how others solved the problem. I have been very frustrated when trying to use database to provide a solution, I always could not figure out how to do and even do not know how to ask!
Now I have follow your advice and have made some progress:
a Survey table containing three fields: PersonID, FoodID, Priority
a Food table containing FoodID, FoodName
a Person table containing PersonID, FirstName
and the three tables are related.
When I add a record in the Person table, a few records will be created in the Survey table (one record for one kind of food) by triggering a script. More work have to be done in the script to handle different situation, but it serve my purpose at the moment. However, I still have to figure out how to input data into the "Survey::Priority" field. How could I create a layout with the same field from different records? Is it by using portal?