A block type of blocks is used to group multiple child blocks together into tabbed regions.
This example actually consists of 4 blocks: a block of type blocks called Goals (the parent block) and three child blocks (a Cascaded goals block; a Development goals block and a Business goals block).
Like all blocks, you can define independent access policies for each child block so that different users have access to different tabs.
There are two ways of defining the child blocks:
- Predefined. The child blocks are predefined in setup.
- At runtime. The child blocks are derived dynamically at runtime.
This block has the following settings:
Property | Example Usage | Description |
Child block source | Predefined Runtime | As described above |
Block provider function | xxx_my_package.my_provider | The function that provides the child blocks at runtime. Only relevant when the Child block source is Runtime. |
Hide tabs if only one | Checked Unchecked | Hides the tabs when the user would only see one. |
Block to repeat | My block | The block should be repeated in each tab. This value may or may not be used; it's down to the implementation of each individual Block provider function. Only relevant when the Child block source is Runtime. |
Predefined child blocks
To create predefined child blocks:
- Create a block of type Blocks. See Creating a block.
- Navigate to the Child blocks section and create each child block.
Runtime child blocks
Runtime child blocks use a PL/SQL function to determine which blocks to display. This type of block is used to display Multiple assignments.
Before the block can be created you will need a PL/SQL function with the following signature:
The parameters passed into this function include the block function details for your convenience. You return a single instance of the xxas_block_table object, which contains one or more child blocks. Each child block refers to an existing block function by its function_id.
Here's an example of a code fragment that would return a single child block:
Once you have your PL/SQL function defined, define the setup as follows:
- Create each of your child blocks that the above function will refer to via its function_id
- Create a block of type Blocks
- Set the Child block source to Runtime
- Enter the name of your PL/SQL function in the block provider function