What have you tried so far? Have you checked the Forms Help System to see if there are any Built-ins that can give you some of the information you need? For example, a search on "First Block" returned results that led me to the GET_FORM_PROPERTY() built-in. This Built-in will give you the following information: FIRST_BLOCK, FIRST_NAVIGATION_BLOCK and LAST_BLOCK. You would also have found references to the set of SYSTEM variables like, CURRENT_BLOCK, CURSOR_BLOCK and TRIGGER_BLOCK. With this information you could then loop through your data blocks displaying the names of each block until you reach the LAST_BLOCK. The basic logic follows:
1. Get FIRST_NAVIGATION_BLOCK from Get_Form_Property() built-in.
2. Navigate to FIRST_NAVIGATION_BLOCK using GO_BLOCK() built-in.
3. Get name of LAST_BLOCK from Get_Form_Property().
4. Start WHILE Loop (:SYSTEM.CURRENT_BLOCK != LAST_BLOCK
5. Display value of :SYSTEM.CURRENT_BLOCK
6. Use NEXT_BLOCK to navigate to the next navigable block