GetField had a different purpose. I suggest that you look it up in help. It can be very useful, but not here.
The thing is, this is really not a matter of layouts, but of the tables on which you base those layouts. Are both layouts based on the same table or different tables? Is there a relationship linking the two tables? How is it defined?
On Layout 2 or a layout based on the same table as Layout 2, you might do the following assuming that each row of your data represents a different record:
- Make the layout a list view layout
- Add a sub summary layout part "when sorted by" Level
- Define a "count of" summary field that counts a field in the table. Any field that is never empty will work.
- Put the summary field and Name fields into the sub summary part.
- Remove the body layout part.
- Enter browse mode and sort your records by Level. (layout will be blank until you sort like this.)
There are other ways to do this, including a related table with one record for each level, but the above is one of the simplest approaches to produce the result you requested.