Dropdown from Bloc
Last updated
Last updated
The Dropdown from Bloc field is a list of values from another bloc (or even the same bloc if required). This data is then presented as dropdown select field. This is commonly used to fetch master or dynamic lists that we want to manage elsewhere. For example, we might have a dropdown of data of customers where the customer information is coming from a CRM system you might have built as another module elsewhere in Blocworx.
Note: This field is distinguishable from the Dropdown from List field field. You use the Dropdown from List field when you know you will never be changing the data in the dropdown field (for example list of counties in your country). Whereas the Dropdown from Bloc field is used for dynamic, changing, flexible and filtered data.
An important feature of this field is that you can get data based on certain values in your form. For example, you might have another bloc with a list of customers, each customer having its own category, like "High Priority", "Low Priority". In the bloc containing this field you might only want a dropdown of customers who are categorised as High Priority. In this case you can have another field in your bloc with the value "High Priority" and this field can then behave as the field that filters the data to only get High Priority customers.
Hint: To trigger this filter the rules in the field set to filter the data must be triggered. One issue with this is, sometimes you may want to filter immediately using the value in a plain data field when the bloc loads. To filter immediately, select the option: "Trigger rules on first initiation of the field"
Parameter | Description |
Type Module name (min 3 letters, leave blank to use current module) | Used to find the module you would like to use in order to find the bloc to get the data from (defaults to the module you are currently in) |
Select Bloc | Select the bloc that contains the field you would like to get the data from |
Select Field | The data from this field will be what will appear in your dropdown selection |
Only get data matching local fields | As described above in Filtering the data in the dropdown. |
Show List in Reverse | Reverses the output of the list, this is useful for numbered items. |
Show Sorted List | Sorts the output of the list alphabetically or in descending order for numbered items. |
Exclude local matching data from field | If an entry in the data in the bloc you are working on contains a value equal to what is in the dropdown list, you may exclude that value from the list. This is useful for not showing items that have been submitted into the form. For example, perhaps you might want to to only show Job Numbers that have not been complete yet, but not show the Job Numbers that have been submitted. Note: Currently to select the same field you are creating, you must first create the field, then edit it. |
Only After Date | This excludes data after a given date, or just type today, to only get data that was submitted that day. Note: This parameter is currently under review to allow more date options, or to allow you to pick another date field that is in the same form, giving you more dynamic control over this option. |
Matching Fields for Excluding Data | This allows you to build chose fields whose values must match in the records in order to exclude the record. For example, if you have a date field and you want to exclude everything that has the same date value set in your bloc, then you would chose that field. As a result it finds all the records with that date and excludes them. |