opengisch / qfieldsync

Sync your projects to QField
https://qfield.org/
GNU Lesser General Public License v3.0
54 stars 26 forks source link

Attachment naming: support for aggregate functions(?) #560

Open gioman opened 7 months ago

gioman commented 7 months ago

I was trying to use an aggregate function as part of the expression to name a photo.

The idea was to name the photos concatenating a date and the code of the administrative unit where the photo is taken, i.e.

now() || '_' ||

aggregate(
 layer:= 'admin_units',
 aggregate:='concatenate',
 expression:=unit_code,
 concatenator:=',',
 filter:=intersects($geometry, geometry(@parent)))

|| 
'.{extension}'

but when trying it, it seems that the whole expression is kind of ignored and the naming given is the one that is used by default, when no expression at all is used.

Not sure if this is by design, a bug or a missing feature.

suricactus commented 7 months ago

Hey, @gioman , thanks for reporting this! Can you please specify which QFieldSync version you are using?

gioman commented 7 months ago

@suricactus 4.7.0