The value relation widget filter expression can now use two
new functions/variables that have access to the current
values and geometry of the form being edited.
This allows for dynamic filtering (drill-down) as explained
in the crowdfunding page:
https://north-road.com/drill-down-cascading-forms/
The new functions/variables are:
Function:
get_current_form_field_value( 'FIELD_NAME' )
Variable:
@current_form_geometry
width buffers
Adds:
- tapered_buffer
- buffer_by_m
expression functions. These expose the same functionality as the
equivalent processing algorithms but for use in expressions
such as geometry generators.
Becuase `represent_value("fieldname")` is much shorter to write and in 98%
there is no need to specify the name separately as
`represent_value("fieldname", 'fieldname')`.
This will lookup the representation value given the widget
configuration. This is helpful to get nicely formatted messages for
value maps, value relations and others in expressions.
Allows easy insertion of map layer IDs and relation IDs into
expressions. Numerous expression functions now utilise these,
so it makes sense to allow them to be easily inserted.
Fix#11680, #16879
Sponsored by Andreas Neumann
This commit adds an epoch() function to the expression engine which
returns the interval in milliseconds between the unix epoch and a
given date value.
This adds a new item_variables expression function when expressions
are used inside a composition context.
The function takes a single argument, the id for an item inside
the composition, and returns a map of variable name to value
for that item.
This allows you to do things like insert text in a label fetching
properties of another item in the composition, eg
Insert scale of map into a label:
map_get( item_variables( 'map'),'map_scale')
Insert x coordinate of map center into a label:
x(map_get( item_variables( 'map'),'map_extent_center'))