Blocworx Documentation

Sub Bloc

A Sub Bloc is a way of embedding any other bloc inside the existing bloc. Both the parent (host) and child blocs can have data connected to each other. This allows for the creation of tools like sub lists within a main form, or perhaps access to secondary data with the ability to update it while still in the first Bloc. The Sub Bloc itself is an existing bloc in your system which is chosen when creating the field.
A very basic example of a Sub Bloc where another bloc called "Sub Bloc" is included in the bloc called "Parent Bloc". In this particular example the "Incoming Shipment Number" field has been linked with the "Shipment Number" field. This allows you to add multiple line items for every Incoming Shipment Number.
Note: The passing of data from the parent bloc to a sub bloc (or vice versa) occurs when the rules/actions occur for the field you are passing the data from.
Hint: The main principle behind a Sub bloc is for having multiple records for a single "parent" record. For example, manging invoices, you could create an invoice and add multiple line items in the sub bloc. To use this effectively it is adviseable to do two things in the Sub Bloc: 1. For the linked field in the sub bloc, add the field parameter Data Filtering Field to make sure only the data related to the value of that field appears.
2. Apply our Keep Data for Next Entry rule in the sub bloc linked field. This means as you keep submitting in the sub bloc you will have to re-enter the value in that field.

Initial Parameters

Type Module Name (optional)
This can be used for accessing Blocs outside of the module you are currently in. You may leave blank if you want to access the the blocs in the current module.
Select Bloc
Use this to choose the bloc you wish to embed
Select what will trigger the bloc to open
The Sub Bloc can be opened via a button, white heading text or simply always be open by default. This parameter allows you to decide this.
Select How the Bloc will be displayed on the screen.
The Sub Bloc can either be a smaller pop up, a full screen pop up or simply be embedded right into the parent bloc/form.
Linked Data Options (Sending Parent Field Data to Child)
Used to connect fields, where you match the parent field with the child field. Simply Select a parent field (a field located on your current bloc) and a child field (a field from the other bloc) and click "Add". This is for sending data from the parent bloc (host) to the child bloc (guest).
Linked Data Options (Sending Child Field Data to Parent)
This is the same as the above except in reverse. When values are changed in the child bloc they can be sent to the parent (useful for values like total counts or mathematical calculations).
Compact View
With this turned on the display of data and the form in the Sub Bloc will be smaller, tightened and space reduced and along with font sizes reduced. This is useful not only for allow more space on the page but also for distinguishing between the parent and child bloc on the form.
Hide the Close Button
This removes the X/Close Button from the bloc, meaning its impossible to close the bloc (useful in combination with more options below where you may want to guide someone through a series of sub blocs without letting them close one).
On Submit, Close the bloc
This is a UX feature in situations where you want the use to just add one value in the sub bloc and not get them to have to X out of it when they are done.
On submit, close the sub bloc and submit the parent form too.
This is a more advanced feature which is also UX based. You may want the user to add a value to the child bloc, but not have to go back to the parent bloc and do the same.
On submit, close the sub bloc and open another one.
Useful for forcing someone through a process or a series of pop ups. The Sub Bloc they would choose would be another field that is a sub bloc on the same parent bloc.
Show a button that will close the sub bloc and open another one.
This option will show a button in the Sub Bloc bloc that allows them to click and move onto the next chosen Sub Bloc. This is similar to the above option but avoids the requirement for the person to have to submit data to go to the next bloc.
For Linking Data: When the data updates on the parent bloc, the child data on the child bloc for that field automatically updates as well.
Don't forget, you can also set filtering options on the child bloc so that the only data loaded in the child bloc is data associated with the value of a certain field, in this case you could choose the child blocs linked field.