Block type of gives the type of the given item. This block is usually used inside if statements to check the type compatibility. In the example below, we fetch an instance of a Language type and then check if the type of “my language” variable is the same as Language.
Block custom type allows defining a new Type, unknown to the Builder.
It is often used inside try-catch statements or in the function signature.
The given code returns a size of a collection of any type (Collection<?> in java). There is no need to specify the type of collection's values to get its size.
Block ID allows you to get the ID of an object. In server functions, the ID block returns Integer type value.
The void type is the type that indicates the absence of data. That means, there is nothing to return.
Block as service provides a service of a type that can be used in Native code later.
Pair and Create pair blocks are used only for String fields!
Block pair is used inside onValue_suggest blocks to specify key-value types for collection parameters.
Create pair block specifies key as the first parameter and the value to be assigned to that key. In the example below, we create a dropdown list of suggested countries by streaming all the countries and adding a newly created pair of String Country instance.Country Name and String with translations string name to show to the collection @values.
After that, you will get a dropdown menu on the web page view. You can enforce onValue_suggest by adding onField_change action, that will be called after you choose a value from a dropdown list.
Value type as reference
The block is used for working with Dynamic fields. It creates a reference of a given object instead of making it’s deepcopy.